|
-
Stopping a movie for 5 seconds and then let it start again.
Making a banner in flash cs4, and trying out AS 3.0.
Any one know how i stop the movie for 5 seconds and then let it start again?
Thanks for any reply.
-
I never used AS 3.0. But you can delay movies with creating an empty mc. In the first frame you stop it, than make a lots of empty frames after it, and in the last, you write your script. So the movie's need to play this mc (for example if you need 5 sec, and you use 20fps, make 20*5 = 100 frames). And when the 100 frames played, will activate the delayed action.
-
Thanks for the reply, but one of the reasons i wanted to do this was to avoid "dead frames" or empty frames(even do it's inside a movie clip).
If i create it in your way, wont the file size get larger?
-
With empty frames I think won't.
-
Registered User
hi,
Something like this:
PHP Code:
import flash.utils.Timer; import flash.events.TimerEvent;
function waitAS3(mc:MovieClip, s:Number = 10):void { mc.stop(); var timer:Timer = new Timer(s*1000, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, function() { mc.play(); } );
timer.start(); }
// example: waitAS3(this, 5); // stop this timeline, 5 seconds
-
Exactly like that. Work very nicely.
Thanks alot.
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
|