PDA

View Full Version : Is there any way to make a scheduled (timed) action?



Syko171
October 26th, 2001, 11:16 AM
Is there any way to make a scheduled (timed) action to a frame?
I mean if the movie plays and it reaches the frame that has an action like "stop" and ... if 90 seconds passed ...do this...
or something like that???

eyezberg
October 26th, 2001, 01:42 PM
yes, there's a getTime function in Flash, so you can check how much currentTime is > than start time. but it's in millisec's i believe..never used

hoodlooms
October 26th, 2001, 03:20 PM
The getTime function is in fact in miliseconds but there is also a function called getSeconds maybe that one is better although I dont know how to use it...

upuaut8
October 26th, 2001, 11:02 PM
(note: I've started using "//" notation. This is a statement in Flash telling the a/s to ignore what's on the right of it. This is so that you can directly copy and paste script from these pages. It is good to put notation on stuff anyway.. for the newbies. I think everyone should make it a practice, as it is a career building skill.)
*****************************

Simplest way would be to have a movie clip on the main stage, at that frame.

onClipEvent(load){
//sets the timer
oldTime=getTime();
}
onClipEvent(enterFrame){
//reads the timer
newTime=getTime();
//detects time passage
if (newTime>=(oldTime+90000){
//tells the main timeline to play
_root.play
}
}

I think that I based that off of Kiloseconds so the timer would have be tweeked to suit your needs.

Syko
October 28th, 2001, 02:31 PM
Thanx guys for helpn' me out... :)

suprabeener
October 30th, 2001, 02:34 AM
oops, accident, please ignore.