[color=red]On the one timeline I am multiple animations to be run, Ecah animations has to stop for 5-10 sec & then move to the another animation.[/color]
For stoping 5-10 min, I hv written below code,
Here “timestart” is a Var, define by me.
onClipEvent (enterFrame) {
if (currentTime+1<=int(getTimer()/1000)) {
timestart++;
// new timer
currentTime = int(getTimer()/1000);
}
if (timestart >= “8”) {
//trace(“I am timestart”)
_root.animation.Play();
}
}
[color=red]Please help me in this.[/color] [color=red]I used Run to this code in Flash MX, But now In Flash MX 2004. it’s not running. Please help me.[/color] [color=red]Or[/color] [color=red]Give me some other Idea for the same fuctionality.[/color]
you have to write :
onClipEvent (load) {
timestart = 0
}
then everything works correctly
because FLASH MX 2004 does not count with 0 when you update your variable with timestart++;
it counts with undefined if its not initialized; a drawback of mx2004
should be: if (timestart >= 8), because “8” means this is a string, not a number …
i think you can solve it better with [COLOR=Navy]setInterval[/COLOR] …
i would also say setInterval is the better solution if you have multiple animations
but :
i tried it with “8” and it worked correctly. now i wonder why :), but i think it is because Flash converts it automatically into an int value if it is compared with an int