PDA

View Full Version : Controlling Playback Automatically


MSG10598
05-18-2005, 05:35 PM
I'm looking for coding/actionscript that will hold the playback head on a frame for a specified amount of time before continuing on with the rest of the animation.

I have text in a frame in a looping Flash ad that I want the playback to hold on so that the text is displayed for enough time (what I set it for) so that someone can read it before the movie continues on to the next part of the animation. The way I've done it in the past is to add more frames in the movie so that the static text can be read before it disappears off the screen. Problem with this method is it adds more frames and size to the finished animation. There HAS to be a better way! A way of "pausing" the playback and then continuing on (until the next "pause" in the animation) without a user needing to click on something to continue the animation.

I'm not that good with ActionScript (still using the basic "click-to-add" method of ActionScripting). I'm more of a graphics/imaging person than a programmer/scripter, so I'll need the simplest and easiest-to-understand method to make this work.

Thanks. :)

dankdoutz
05-22-2005, 04:22 AM
Yea, I've been looking for a way to pause the playback too...

Am waiting to hear back on this one!

zamfir
05-23-2005, 08:15 PM
Well in the olden days of Basic we iterated a for/next loop so many times, and that worked then. I see no reason why it wouldn't work now. Something like this:

var n:Number=1
for (n;n==99999;n++) {
//do something here maybe? I don't know.
};

zamfir
05-23-2005, 08:23 PM
Apparently computers are just too damned fast for that. Hrmm...

zamfir
05-23-2005, 08:27 PM
It's gonna have something to do with setInterval() and Media.pause() I'm guessing.

zamfir
05-23-2005, 08:59 PM
or how about something using getTimer? Like:

t = getTimer();
trace(t);
t2 = t+9999;
trace(t2);
do {
t = getTimer();
} while (t<t2);