Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Wait 4 Seconds Then .... ...possible?



is there a way to have some type of actionscript that allows some sort of delay before an action is executed?

Code:
WAIT FOR 4 SECONDS ... THEN
_root.area.loadvid.loadMovie("video/campania_albergatore_01.swf");
please help?



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-21-2009, 11:27 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Wait For 2 Seconds
I have a button in a movie. When it is pressed it uses the 'get URL' command to hyperlink to another page. I wish for it to wait 2 seconds, then hyperlink upon being pushed.

How do I do this?

Thanks

Wait A Few Seconds Before Doing Something?
Hi,

I have this code right now that makes the background move when a button is pressed. I would like to make it wait 3 seconds before moving the background when a button is pressed so that my swf's exit animation finishes first. Can someone please tell me how to do this?


Code:
_root.currMovie = "home";
container.loadMovie(_root.currMovie+".swf");

bgTargetX = 42;
bgTargetY = 117;
onEnterFrame = function(){
backGround2._x = backGround2._x - ((backGround2._x-bgTargetX)/16);
backGround2._y = backGround2._y - ((backGround2._y-bgTargetY)/16);
}
newsbutton.onPress = function(){
bgTargetX = -648;
bgTargetY = 117;
}
homebutton.onPress = function(){

bgTargetX = 42;
bgTargetY = 117;
}
personnelbutton.onPress = function(){
bgTargetX = -1338;
bgTargetY = 117;
}
studiosbutton.onPress = function(){
bgTargetX = -2028;
bgTargetY = 117;
}
contactbutton.onPress = function(){
bgTargetX = -2718;
bgTargetY = 117;
}
Thanks, Matt

Wait A Few Seconds?
Hi,

I have this code right now that makes the background move when a button is pressed. I would like to make it wait 3 seconds before moving the background when a button is pressed so that my external swf's exit animation finishes first. Can someone please tell me what to add to this code?


Code:

_root.currMovie = "home";
container.loadMovie(_root.currMovie+".swf");

bgTargetX = 42;
bgTargetY = 117;
onEnterFrame = function(){
backGround2._x = backGround2._x - ((backGround2._x-bgTargetX)/16);
backGround2._y = backGround2._y - ((backGround2._y-bgTargetY)/16);
}
newsbutton.onPress = function(){
bgTargetX = -648;
bgTargetY = 117;
}
homebutton.onPress = function(){

bgTargetX = 42;
bgTargetY = 117;
}
personnelbutton.onPress = function(){
bgTargetX = -1338;
bgTargetY = 117;
}
studiosbutton.onPress = function(){
bgTargetX = -2028;
bgTargetY = 117;
}
contactbutton.onPress = function(){
bgTargetX = -2718;
bgTargetY = 117;
}
Thanks, Matt

Wait For X Seconds
I just wish the video to wait for 3 seconds before starting, what action script command should I use?

Thanks,

Dario

Wait X Seconds, How?
Hi, i want to have some action script code like:
//some code here
//wait so many seconds(or milliseconds)
//then do so more code here

I know I could do this using the time line and lots of frames, but surley there is a way to do it in actionscript.

How would I do this, or is it near impossible and better to do it with frames?

Thanks for any help or response,
Ougle.

Wait X Seconds, How?
Hi, i want to have some action script code like:
//some code here
//wait so many seconds(or milliseconds)
//then do so more code here

I know I could do this using the time line and lots of frames, but surley there is a way to do it in actionscript.

How would I do this, or is it near impossible and better to do it with frames?

Thanks for any help or response,
Ougle.

Wait A Few Seconds Then Do This
how can i tell my movie in AS2 to wait 45seconds then goto frame 1 again?

Wait For X Seconds On A Frame
I just want to stop my timeline for 5 seconds after an animation completes.

I try with SetInterval, but i do mistake somewhere,

can anyone gives me code for this.

Wait For X Seconds On A Frame
I just want to stop my timeline for 5 seconds after an animation completes.

I try with SetInterval, but i do mistake somewhere,

can anyone gives me code for this.

Make The Scripting Wait A Few Seconds?
how can I make it so that my scripting will wait a few seconds before continuing to the next section of scripting, and/or to the next frame?

Getting Flash To Wait A Set Number Of Seconds
does anybody know how to make flash wait a set number of seconds, without using the timeline?
i'm pretty sure in javascript you can tell it something like:
wait(3000);

but how do you do this is flash? i haven't been able to find anything like the wait command... do you have to use getTimer()?
i am using flash 5.
any help is greatly appreciated. thanks in advance.

-jlatg

Wait On Frame For X Amount Of Seconds
I am creating a photo transition and instead of using 100's of frames
I would like to ad an action that tells flash to wait on a frame for a certain amount of time.

Any suggestions?

[FMX04]wait/delay 2-3 Seconds? How?
I just want to have my code wait a couple seconds to let some scripted animation finish then load a movie into a holder but I can't seem to find a pause/wait/delay function is there one and how would I use it or can someone tell me how to do it somehow thats not too processor intense if at all possible. Thanks in advance

Making A Movie Clip Wait A Few Seconds
Hey all,

This should be a fairly easy question to answer. Its 3:30Am and Im not thinking straight.


I just want a button when you rollover it it will play a movie clip (simple tween moving from left to right) then when I roll off the button, I want the movie clip to wait, say 3 seconds and then go on and move from right back to its initial spot.

Nothing fancy right now...just some simple coding to do this. I was trying the get timer() but I couldnt get it to work.

help?

dduck1934

Back 5 Frames - Wait 3 Seconds - Play
hey all!

i am trying to make a "back" button...
so what i want for it to do is go backwards 5 frames... then wait for 2-3 seconds and then continue playing

anyways...
this doesn't work


Code:
on (release) {
_currentframe-5;

{waitFor = 3;
// seconds;
timeToGo = getTimer()+waitFor*1000;
_root.stop();}

{ if (getTimer()>=timeToGo && !_root.fStopTimeline)
{ _root.play();}
}
play ();
i'm getting syntax errors for


Quote:




Scene=Scene 3b - maps, Layer=controls, Frame=1: Line 1: Statement block must be terminated by '}'
on (release) {

Scene=Scene 3b - maps, Layer=controls, Frame=1: Line 11: Syntax error.




please help me
chik

Make A Sound Object Wait For 2 Seconds?
How do I make a sound object wait for 2 seconds before it starts???

Here's the go to create and play the sound:

nar = new Sound(nar_MC);
function playPage() {
nar.stop();
nar.attachSound("page 1");
narVolume = 400;
nar.setVolume(narVolume);
nar.start();
}
function mute() {
nar.stop();
nar.attachSound("page 1");
narMute = 0;
nar.setVolume(narMute);
nar.start();
}
if (playing != true) {
mute();
} else {
playPage();
}
stop();

Getting The Flash Player To Wait A Set Number Of Seconds
does anybody know how to make flash wait a set number of seconds.
i'm pretty sure in javascript you can tell it something like:
wait(3000);

but how do you do this is flash? i haven't been able to find anything like the wait command... do you have to use getTimer()?

any help is greatly appreciated. thanks in advance.

-jlatg

How To Make A Frame Wait For A Number Of Seconds?
Can anyone please help me? I'm making an animation, and I wanted the head of the player to stay still on a frame and go to next frame after a certain number of seconds...

Can anyone please teach me on how to do it? Thanks in advance!

Click Button Wait 2 Seconds Gotoandplay
Hi, I know this should be easy but its driving me mad, I have looked through the forum but I cant figure it out.

When i click a button i want it to wait 2 seconds and then gotoandplay a frame.

I would do it on the timeline but it needs to go forwards and backwards on the timeline and doing it on the timeline would just be overcomplicated

any help would be great,

(flash mx 2004)

Why Can't There Be This Simple Frame Action: Wait (no. Of Seconds)? What's Easy?
What an easy way to just make the movie wait a couple of secs?

A complicated way I can manage, but what's a short action script to make the movie pause at a certain frame?

Flash Timer? Wait X Amount Of Seconds, Then Gotoandplay
i basically need to reduce the size of some movies. so im thinking of cutting down on tweening and frame amounts, and basically pausing for 5 seconds or so, then playing another movie. instead of tweening for 60,000,000 frames then moving on.

any ideas?

Function That Wait's 5 Seconds And Runs Anothr Function
hy...I want to make a function that waits 5 seconds, after that to run another function that changes the content (changeContent) to the next label

this is all i managed to do...I hope it's wright

function autorun() {
if (button_label = 0) {
changeContent(1);
} else if (button_label = 1) {
changeContent(2);
} else if (button_label = 2 ) {
changeContent(3);
} else if (button_label = 3) {
changeContent(4);
} else if (button_label = 4) {
changeContent(5);
} else if (button_label = 5) {
changeContent(0);
}
}

I need this in AS2.0....
Can someone help me? Thanks!

"wait A Few Seconds" In Flash
Is there an easy way to say to flash that it should wait a few seconds before going to the next frame?

Thanks,
Waldo

Play, Then Wait (a Few Seconds) Then Play Etc
Hi

It would be great if someone could help me with this:

instead of having long stretches in my timeline it would be great to have a keyframe with actionscript 2 have the playhead wait a few seconds, then play.

is there an easy way to have this happen? and can i change the amount it waits on different key frames (3 seconds here, 5 seconds there) ?

thanks in advance

Wait "n" Seconds In "x" Frame
How could i Wait "n"seconds in an specific frame. Thanx

Timer Seconds Aren't Seconds On Fast Connection?
On my flash site at
http://www.yogashanti.com
there is a timer which displays my random quotes for arund 20 seconds, but on fast connections woooooah!

How do i resolve this without setting the seconds to a looong length of time (which would mean on dial-up connections each quote will be there forever.

I hope i made it clear what the problem is - sorry if it seems un-clear.

Many thanks in advance

Cesca

Wait Script Or Wait On This Frame Required
hey,

i want my movie clip to stop and wait on a definied frame for a definied amount of seconds...
(...without adding the right number of "empty" frames after the key-frame...)

how can i script an easy funktion() to make my movie-clip wait for some seconds on a key-frame??

can somebody help me on this???
thanks

How To Start A Sound At X Seconds And Stop At X Seconds?
I'm trying to figure out how I can make the sound file that I load into Flash start at x seconds and end at x+30 seconds.

So basically, I just want a 30 second sample to play starting at a specific time position. Does anyone have any advice on how to do this or have links to somewhere I can read up on it?

As always, thanks for any help

-Ind

Convert Seconds To Minutes:Seconds
Hey guys,

I am currently using the following code to display the secconds of a FLV being played:


ActionScript Code:
time_txt.text = Math.round(_root.video_mc.videoZ.playheadTime*100)/100;

I need to change this to display MM:SS (minutes:seconds) rather than just seconds and decimals.

Any idea how I can do this?

The javascript people here at work suggested something like this:


ActionScript Code:
function strPad(str, places, pad, side) {
while (length(str) < places) {
if (side == "left") str = pad add str;
else str = str add pad;
}
return (str);
}
time_txt.text = Math.floor(_root.video_mc.videoZ.playheadTime / 60) add ":" add strPad(_root.video_mc.videoZ.playheadTime % 60, 2, 0, 'left');

Any help would be lovely.

Thank you!

Scott

Minutes And Seconds From Seconds
Hi

I have a video player and trying to make a time indicator of minute and seconds.

I got fairly close, however it started to count backwards

Anyone got a script? Thanks

Converting "seconds" To "minutes:seconds"
I'm trying to add a running timer to my flash movie. I've got it now so that it counts seconds (by comparing _currentframe with the frame rate), but I'd like to be able to express that in minutes:seconds.

Anybody have a nice script that can do that?

Converting "seconds" To "minutes:seconds"
I'm trying to add a running timer to my flash movie. I've got it now so that it counts seconds (by comparing _currentframe with the frame rate), but I'd like to be able to express that in minutes:seconds.

Anybody have a nice script that can do that?

Wait For Go?
Hello,
I was wondering the following thing. Is there a Function or script, that you can put on a keyframe like this:

wait 10 seconds and then play?

Thanks!

Wait For Go?
Hello,
I was wondering the following thing. Is there a Function or script, that you can put on a keyframe like this:

wait 10 seconds and then play?

Thanks!

Wait And If...........please Help
ok i want a script on a button that says if the mouse is within me and the current frame == 1 then go to and play frame 5.....
i dont want to use 'on rollover' because this doesn't always work
i think this is simple but i cant do it

please help me....

Tom

Wait
I'm trying to create a menu similar to the one used on http://www.mill.co.uk.

I have roughly figured out how to control the rollover/rollout movment of the logo by changing the size, position and rotation of the logo.

What I can't understand is how to pause the logo before reverting back to it's original position when you mouse off the button.

Any help would be greatly appreciated.

How To Wait?
hello
i have a movie clip which has 720 frames.i am inserting that clip in the main time line key frame which has only 20 frames.what do i have to do if i want the main timeline to wait for all the 720 frames of the inserted movie clip before it goes and plays the 21st frame.

bye
geethanandh
[Edited by geethanandh on 03-04-2002 at 04:05 PM]

Wait?
Hi

i need to know if there is a command in actionscript that i can use to wait a certain amount of time before it carries out the next action


Thanks


Luke

How To Wait?
hi
i am loading a .swf file inside a movie clip,how do i wait until all the frames of .swf is loaded.I need the code for doing that

bye
geethanandh

Wait?
Is there some actionscript I can add to wait so manyframes/seconds before moving to the next command>

Wait...i Need More Help
alright, that worked so far...but i guess i didn't explain something quite right. see...i have another button that appears when you click the original button (lets call it button "a") now button a (the second state of it...just how i wanted) appears without the user having to hold down the mouse...but i need to have it so that when you click and let go and pull the cursor away, it all stays there, including the second button (button "b" i suppose you could call it) anywayz...thanks again for ur help!

Wait Then Go To And...
Hi,

Really need some help with some scripting - not sure how hard this will be!

Basically what I need to happen is when I click on a button it tells a movie clip to remain on it's current frame for a set amount time then go to another specafied frame number/label.

I have no Idea how to do this, so any help would be appreciated.

Sorry About The Wait...
Right, I've used hanratty21's example for Yahoo!

Download the file which contains a swf, fla and txt file. In this example I've used an external txt file as I think this is the best way to do things. This way if any changes are to be made to the information, they can be easily done to the txt file without touching anything else.

the swf - you'll notice the first bullit point is a link to Yahoo!. I've not applied any other links, but the principle is the same, technically each bullit point could be a different link.

the fla - show's how its done!

the .txt - notice at the start of the file is 'scrolltext=' this ties it in with the action script of 'loadVariables("scrolltext.txt", "");' in the fla file.

Hope this helps!

Wait
Is there any Actionscript to make the browser wait a short period of time (~1 second) after clicking a link so that a button's onPress animation can finish playing before the browser goes to the new page?

Wait For Me
hello,

i need to crate a slideshow that loads jpgs dynamically from a certain location.

I found something on http://www.macromedia.com/support/fl...slideshow_xml/

Does anyone know how I could add a fade transition effect to this and an autoadvance button that cycles through the slides in 4second intervals...? I have some basic experience in flash but when it comes to higher action script it easily frustrates me

I donīt know how to make flash wait simple 4 seconds...arrrgh...

I tried so many different things but I just canīt figure out how to make flash wait for 4 seconds and my transition effect looks weird because the image pops up for a moment and then starts fading in.#

Thanks for any help...
Aloha from hawaii
Attila

Wait A Sec....
sorry, i didn't mean for those urls to go in as actually links and they're truncated even more here:


Code:
http://www.tctmd.com/set-props?unset_vars=category%5fid&return_url=%2fAbstractss%2ftable2%2ehtml&vars=%7bcategory%20acutecosynd%7d%20%7bsubcategory%20acutecosynd%3acoronary%7d
gets truncated to here:


Code:
http://www.tctmd.com/set-props?unset_vars=category%5fid&return_url=%2fabstracts%2ftable2%2ehtml&vars=%7bcategory%20acut

Wait And Go?
Is there a way to, at the end of a movie clip ad a script that will wait a certain amount of time before going back to frame 1?

[F8] Please Wait....
I've been looking at tutorials for preloaders in flash but they are not really what I am looking for.

I have a script (PHP based) that sends a request to a remote server (using cURL) to process an online order and I need to have some sort of Please Wait... screen showing while the script waits for the servers reply.

I've been using a CSS overlay but its messy and ugly and I thought about using Flash to create some sort of loading bar or something similar while the do..while loop is executed.

I was thinking of the bar where it gets bounced back and forth like pong but I am unsure where to even start this or if I can do this. Would this also involve ActionScript?

Not sure what I want to do is called so I haven't really been able to google successfully for it.

Thanks!

How To Wait For A Second?
Is there any easier way of making something literally wait a second? Or will I have to resort to a timer function. What i want to do is remove a child in the background 1 second after a transition manager event has begun.

If it is the only way could someone give an example of a timer function that will enable me to reference somer sort of ontimer finish.

Any info will be superb

Copyright Đ 2005-08 www.BigResource.com, All rights reserved