Solved

add a delay in flash action script

Posted on 2003-12-02
5
1,344 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
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to put actionscript code for a button? 6 139
How to display a webpage in a flash 10 366
Youtube video error 30 810
Google Chrome Blank White Screens 13 302
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

831 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