-
Play/pause button
Hi,
Does anyone know how to create a play/pause button to control my movie animation?
-
is your movie all in one movieclip or on stage? if yes, then it's very simple. Make a new layer spanning the whole length, make a button. then try this code on the very first frame of the movieclip.
Code:
play();
var playing:Boolean = true;
play_btn.onRelease = function(){
if(playing){stop();playing=false;}
else{play();playing=true;}
};
unless if someone can come up with more efficient code.
-
thats brilliantly simple and efficient, thankyou. I tried another method from an online tutorial yesterday and it was too complex for a simple operation.
-
Your code saved me!!! We should be so lucky to have people willing to share.
Thank you!
Junior
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|