# Is there any way to make a scheduled (timed) action?

**URL:** <https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522>\
**Category:** programming\
**Created:** [October 26, 2001, 3:16pm UTC](https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522 "2001-10-26T15:16:09Z")\
**Posts on this page:** 6\
**Page:** 1

<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:** [October 26, 2001, 3:16pm UTC](https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522/1 "2001-10-26T15:16:09Z")

</div>

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???

---

<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:** [October 26, 2001, 5:42pm UTC](https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522/2 "2001-10-26T17:42:15Z")

</div>

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

---

<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:** [October 26, 2001, 7:20pm UTC](https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522/3 "2001-10-26T19:20:27Z")

</div>

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…

---

<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:** [October 27, 2001, 3:02am UTC](https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522/4 "2001-10-27T03:02:55Z")

</div>

(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.

---

<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:** [October 28, 2001, 7:31pm UTC](https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522/5 "2001-10-28T19:31:40Z")

</div>

Thanx guys for helpn’ me out… 🙂

---

<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:** [October 30, 2001, 7:34am UTC](https://forum.kirupa.com/t/is-there-any-way-to-make-a-scheduled-timed-action/3522/6 "2001-10-30T07:34:23Z")

</div>

oops, accident, please ignore.
