A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: wait script for a frame... how can i do that??

  1. #1
    Senior Member
    Join Date
    Aug 2007
    Posts
    121

    wait script for a frame... how can i do that??

    hey,

    i want my movie clip to stop and wait on a definied frame for a definied amount of seconds...
    (...without adding the right number of "empty" frames after the key-frame...)

    how can i script an easy funktion() to make my movie-clip wait for some seconds on a key-frame??

    can somebody help me on this???
    thanks


  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    on the frame you want to stop
    PHP Code:
    stop();

    function 
    restart(){
    clearInterval(timeInt);
    play();
    };

    timeInt setInterval(restart,5000); // 5000ms = 5 secs 

  3. #3
    Senior Member
    Join Date
    Aug 2007
    Posts
    121
    cool! thanks...

    i laso found this version:

    put into your raaot tim timeline:

    _global.wait = function(time:Number, movie:MovieClip):Void {
    movie.stop();
    nInterval = setInterval(replay, time*1000, movie);
    };

    function replay(movie:MovieClip):Void {
    movie.play();
    clearInterval(nInterval);
    }


    put it into your clip into the frame you ant to stop at:

    wait(3, this); //This will pause the the movieclip for 3 seconds

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