Solved

add a delay in flash action script

Posted on 2003-12-02
5
1,348 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Accepted Solution

by:
Rohitmr earned 43 total points
ID: 9866139
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
ID: 9981079
this.onPress=function(){
this.setPause(1000);
}

you can remove the onPress function
0
 
LVL 9

Assisted Solution

by:rexmor
rexmor earned 41 total points
ID: 10039773
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

617 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