A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: delay script problem

  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    87

    delay script problem

    i have this script for setting a delay ...now, the first time i run the movie the delay works, now, if i call the script a 2nd time, the delay doesen't work anymore ...please look over my script and tell me if there's something wrong ...

    code:

    stop();

    first = function () {
    xPos = _root.mcMenu._xmouse;
    yPos = _root.mcMenu._ymouse;

    if (xPos<-475 or xPos>475 or yPos<-110 or yPos>48) {


    _global.delay = 1;
    myInterval = setInterval(delays, 2000);
    delays = function () {



    if (delay == 1) {
    clearInterval(myInterval1);
    _root.mcMenu.onEnterFrame = function() {
    _root.mcMenu.prevFrame();
    if (_root.mcMenu._currentframe == 2) {
    delete _root.mcMenu.onEnterFrame;
    }
    };
    }

    clearInterval(myInterval);
    };

    } else {

    _global.delay = 0;
    }
    };
    myInterval1 = setInterval(first, 10);


  2. #2
    Junior Member
    Join Date
    Aug 2005
    Posts
    6
    you have a spelling mistake in line10,

    clearInterval(myIntervall);

    hope I can help you, maydays

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center