# Stop Timeline movie for 5-10 sec, then another movie will run

**URL:** <https://forum.kirupa.com/t/stop-timeline-movie-for-5-10-sec-then-another-movie-will-run/106723>\
**Category:** Uncategorized\
**Created:** [April 8, 2004, 8:23am UTC](https://forum.kirupa.com/t/stop-timeline-movie-for-5-10-sec-then-another-movie-will-run/106723 "2004-04-08T08:23:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonalisfk](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@sonalisfk](https://forum.kirupa.com/u/sonalisfk)\
**Post date:** [April 8, 2004, 8:23am UTC](https://forum.kirupa.com/t/stop-timeline-movie-for-5-10-sec-then-another-movie-will-run/106723/1 "2004-04-08T08:23:50Z")

</div>

[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]**

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 8, 2004, 10:14am UTC](https://forum.kirupa.com/t/stop-timeline-movie-for-5-10-sec-then-another-movie-will-run/106723/2 "2004-04-08T10:14:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 8, 2004, 11:40am UTC](https://forum.kirupa.com/t/stop-timeline-movie-for-5-10-sec-then-another-movie-will-run/106723/3 "2004-04-08T11:40:02Z")

</div>

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] …

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 8, 2004, 12:30pm UTC](https://forum.kirupa.com/t/stop-timeline-movie-for-5-10-sec-then-another-movie-will-run/106723/4 "2004-04-08T12:30:50Z")

</div>

i would also say setInterval is the better solution if you have multiple animations  
but :

> [@ultradeq](#):
>
> should be: if (timestart \>= 8)…

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
