A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Start after ... sec

  1. #1
    Senior Member
    Join Date
    Sep 2002
    Posts
    106

    Start after ... sec

    Is there an actionscript that tells a movie to gotoAndPlay after a few seconds.
    www.flashflow.be

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    There is a timer function. See any of the effect.txt files for finishing motion scripts like explode or zoom out.

  3. #3
    Senior Member
    Join Date
    Sep 2002
    Posts
    106
    Thanks, I'll try it.
    www.flashflow.be

  4. #4
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890

    Re: Start after ... sec

    Originally posted by simpelendidi
    Is there an actionscript that tells a movie to gotoAndPlay after a few seconds.
    The easyest way:
    Insert 3 keyframes in front of the main movie loop.
    Insert this script:

    for keyframe 1:
    del = n; ("n" = the delay,for example,if the speed is 30FPS, n = 30 for 1 second delay)

    for keyframe 2:
    del -= 1;

    for keyframe 3:
    if(del == 0){gotoAndPlay(4);}
    else{gotoAndPlay(2);}

    that's all !

  5. #5
    Senior Member
    Join Date
    Sep 2002
    Posts
    106
    Thanks, this realy helps.
    www.flashflow.be

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    You can also place this on a Movieclip- Simply convert a Frame to a one frame MC.

    onclipevent(enterframe){
    FPS= 12;
    Wait= 5;
    Delay= Wait * FPS;
    Time +=1;
    if( Time == Delay)
    {
    _parent.play();
    Time=0;
    }
    }

    Place a Stop Movie Action on the Frame you want the delay to be on.

    Again set FPS to the Movies FPS and set Wait to the Wait you want in Seconds.
    Attached Files Attached Files

  7. #7
    Senior Member
    Join Date
    Sep 2002
    Posts
    106
    This is what I had in mind. Thanks.
    www.flashflow.be

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