Yeah your rite about it not being suported in Flash 5:
Availability: ActionScript 1.0; Flash Player 6
I guess you could just use a getTimer, bit of a dirty way to do but it would work i guess.
[AS]on(release){
//WHAT YOU WANT TO STRAIGHT AWAY
time = getTimer()
trace(“start”)
this.onEnterFrame = function(){
curTime = getTimer()
dif = curTime - time
//trace(dif)
if(dif > 5000){
trace("5seconds")
delete this.onEnterFrame
//WHAT YOU WANT IT TO DO AFTER 5 SECONDS
}
}
}[/AS]
But I have a feeling this.onEnterFrame wont work cause its flash 5. So im stumped.
That new event model (dynamic event handlers) are available since version mx only. You would have to use something like onClipEvent and getTimer instead to count the time.
Open a new window with the swf, when you want it to pause, close the window, and start timing with javascript, then reopen the window with a spercial argument after the time’s elapsed. :lol:
um nokrev i dont get that and i dont think it will work the way i want it to…
aussie devil, do you know how to do the get timer then for flash 5?
:d:
Edit:
and hey,
some_xes = a_number*"X";
How can i get this to work so that if a_number is 5 then some_exes is XXXXX and if a_number is 0 then we have zero Xes, IE, it multiplies a text a with a number.
That new event model (dynamic event handlers) are available since version mx only. You would have to use something like onClipEvent and getTimer instead to count the time.
onClipEvent and enterFrame events don’t work on button objects in any version of Flash.
Create a blank movie clip on the stage and call it ‘timer1’. Inside this clip, put a ‘stop();’ on the first frame, then skip forward 5 seconds (5 x your framerate), and insert a keyframe with the actions to execute after 5 secs. Then, on your button put:
on (release) {
//thing to do instantly
_root.timer1.play();
}
That’s the nice, messy AS-noob’s way (for people like me)