Solved

add a delay in flash action script

Posted on 2003-12-02
5
1,318 Views
Last Modified: 2008-02-26
How do i add a delay say for 1000 milliseconds in my flash action script??
0
Comment
Question by:netmahesh
5 Comments
 
LVL 1

Accepted Solution

by:
Rohitmr earned 43 total points
Comment Utility
Do you want the flash to stop playing or the actionscript to wait for 1000 ms

you can use the 'setInterval' keyword that calls a function after a certain time. Remember to save the id generated by setInterval and then clear the Interval using "clearInterval" and that id

function wait(){
   play();
   clearInterval(_level0.IntervalID)
}
stop;
_level0.IntervalID = setInterval(wait,1000);

0
 
LVL 1

Assisted Solution

by:chrome_gecko
chrome_gecko earned 41 total points
Comment Utility
this.onPress=function(){
this.setPause(1000);
}

you can remove the onPress function
0
 
LVL 9

Assisted Solution

by:rexmor
rexmor earned 41 total points
Comment Utility
hello,

how about not using the actionscript but using the frames of a movieClip... just extend it...( applicable only to simple timer).


rexmor
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now