Time Delay
Hi,
In my program images has to be coming sequencely. between the image sequence i need to set some time delay.
Can anyone suggest me how to solve this...
Thanks......
ActionScript.org Forums > Flash General Questions > Flash 8 General Questions
Posted on: 04-22-2008, 05:46 PM
View Complete Forum Thread with Replies
Sponsored Links:
Delay: Need Escapable Time Delay Actionscript2.0 Function (Flash8Pro)...
Hi,
I am brand new to Flash® 8 Professional. I have many year experiece as a Visual C++ programmer, but am having some troubles learning to code in Actionscript2.0...
I wish to have an Actionscript2.0 function that does the following:
Delay for x milliseconds, but if user clicks mouse in Flash document then delay is immediately over.
Can someone with experience give me some hints on how to code this in Actionscript2.0? I am using Flash® 8 Professional.
Thanks in advance!
P.S. - Working on a Flash® Tetris® game called "TetriCrisis100%™".
JeZ+Lee
Silent Hero Productions®
View Replies !
View Related
Time Delay
I want to add a time delay within a loop. The loop controls the speed of ten objects but without a delay they all move into place at the same time. I want them to be staggered so at the end of each loop it pauses for 500 milliseconds. Does anyone know how I can do this,
Pete
View Replies !
View Related
Time Delay
My code on an object is:
Code:
onClipEvent(enterFrame){
this._visible=false
x=random(10)
if(x==0){
this._visible=true
}
}
I want the this._visible=true to last about two seconds, but I want the rest of the movie still going.
I've tried both
Code:
_root.delay.play()
do {
this._visible=true
} while(_root.delay._currentframe<40)
And
Code:
time=GetTimer()/1000
do {
this._visible=true
} while(GetTimer()/1000 - time < 2)
But they both freeze up my Flash player...
Any suggestions?
View Replies !
View Related
Time Delay
What's the best way to script a time delay in Flash 5? I want the movie to pause for 10 seconds before advancing to the next frame, and I don't want to add frames to do it. Any ideas?
Thanks loads!
Anette
View Replies !
View Related
Time Delay
hi!! i have a movie in which i inserted a time delay.
what it does is simply that a phrase appears, stays for 3 seconds and disappears again. it works fine BUT the problem is that while the WHILE loop operates, all other animated swf files on my HTML page freeze!! can this be avoided?
thanks!!!
(here's my script)
delay=3000;
startTime=getTimer();
currentTime=getTimer();
while (currentTime - startTime < delay) {
currentTime = getTimer();
}
play();
View Replies !
View Related
Time Delay? Anyone? Please?
Is there a way of scripting a time delay in Flash? Basically a lot like a screensaver, if a user does not move the mouse for more than a set number of minutes, tell the movie to go to a default frame/menu etc.
I'm sure there is a quite simple wy of doing this, I'm more of a designer, my scripting is fairly basic........
Cheers
View Replies !
View Related
Time Delay
I have a script on frame 1 on my animation. a script on frame 30. I want the script to delay a re-loop by 10 seconds. What am I doing wrong?
first frame of animation timeline>>
Code:
var startTime = getTimer();
var countAmount = 5;
var elapsed = 0;
last frame of animation timeline>>
Code:
elapsed = getTimer() -starTime;
if (elapsed > countAmount *1000) {
gotoAndPlay(1);
} else {
stop();
}
View Replies !
View Related
Time Delay
Hello,
I have a object (preferably not mc) in flash which moves on the screen between the first 20 frames. I wan't the object to stop for 5 secs each at frames 5,10,15 and 20. any ideas please !!!!!!!
thank you
Harish
View Replies !
View Related
Time Delay Between MC's
I'm building a presentation where the users are to "walk through" several pages. The pages contain images and text, and each page is one scene. The text are fading in-movies. Some pages has two or three such "text movies".
How can I make e.g two text-movies that are in the same frame in a scene play one by one with a time delay, without using buttons? Can anyone help?????
View Replies !
View Related
Time Delay
Hi , im lookingfor some orientation , or help , to do es time delay on the main line , example, play and stops on frame 50 20 sec. then play frame number 51 , and so on.
thanks!.
View Replies !
View Related
Time Delay
Hello Flashkitters,
My Problem:
I have this script to read a php file on frame 1:
loadVariablesNum("scripts/read/read2.php", 0, "POST");
loadVariables("scripts/read/read.php", "text2", "POST");
Can this scrpt be implmented/re-done so that it would run it every 30 seconds or so?
I cannot use the time line as a delay becuase it is amzingly compleated with other scripts and files written on it.
Thanks in Advance.
View Replies !
View Related
Time Delay?
I am trying to get this object to move somewhere and to stop for a given duration (2-3seconds).
I have it set up so that it does move to the location, and everything works fine, but It is not staying in the location for the ammount of time I want.
What actionscript do I need to add to get it to pause?
Here is what I have right now.
onClipEvent (enterFrame) {
if (myMouse) {
_x += (125-_x)/3;
_y += (350-_y)/3;
} else {
_x += (_root._xmouse-_x)/3;
_y += (_root._ymouse-_y)/3;
}
}
View Replies !
View Related
Time Delay
Hi - At the end of a scene I want the movie to go to a frame label within the movie, which I can do fine, except I want to go to the frame after say 20 seconds.
How the hell do I do that without creating loads of blank keyframes in a timeline?
Thanks guys
Sam
View Replies !
View Related
Time Delay
Hi Guys,
and thanks in advance.
I need to hold a frame in place for 10 sec.
for example, 12 fps movie.
at frame #13, hold for 10 secs, then goto frame 14 and play.
any help?
thanks again.
View Replies !
View Related
Time Delay
hi, can anyone give me hand with this?
I want that when i press a button 2 things happen.
1. change the value of a variable (no problem)
2. Wait a couple of seconds and then go to a different frame.
Ok, how do i do the code for the time delay for the second part.
Please if anyone knows help me.
Thanks a lot.
G
View Replies !
View Related
Time Delay
I have set up a site where each page is a unique swf file. Each page has a preloader with a visual for the user displaying percentage loaded. When I navigate to a couple of the pages the screen goes blank and then the preloader shows up having already partially loaded the swf (It will start at 25% rather than at 1%). What can be causing this? I've already created new pages from scratch thinking something might've gotten corrupted but that didn't help. Thank you.
View Replies !
View Related
Time Delay
Bit stuck on this one. I just want to put a time delay in this IF statement so it waits a few seconds before it goes to and plays the frame "pic1".
code: if (_root.Book.CurrPage == 1) {
trace("IF statement 1 Matched!");
gotoAndPlay("pic1");
}
Many thanks, Sam
View Replies !
View Related
Time Delay
I am using a localConnection in order to send a variable between two flash movies, the problem is that the second flash movie(the one recieving the variable) needs to already be open.
I was wondering if their was a way to delay when the variable is sent.
I am opening the new movie via getURL and sending the variable on the
on(press) action and it must be done this way, I was just wondering if their was a way to slow down when the variable is sent, possibly with setInterval.
Any help would be greatly appreciated.
View Replies !
View Related
Time Delay?
I have a series of quotes inside of individual movie clips.
On the first frame, on the first layer, i have actionscript that says :
quotes = random(96) + 0;
gotoAndPlay(quotes);
This randomly picks a frame, and plays the frame. This is good, but i want to put a time delay in between each frame/quote. Is this possible?
Thanks,
P1
View Replies !
View Related
Time Delay
Hi Guys
I need help, am making a presentation in flash, with several movies, in my main movie i load the other movies! as there is no buttons, is there a way to load a movie on a frame and after x seconds it goes to the next frame to load another swf.
ive been trying this but it mess up the following delay!
stop();
loadMovie("movie.swf", "loader");
var Int = setInterval(function(){
clearInterval(Int);
nextFrame();
}, 30000);
Any idea!?
View Replies !
View Related
Time Delay
Im looking for a simple code that I can put on a frame for a time delay. Lets say my movie is 100 frames long. When it gets to frame 50 I want it to wait 5 second before continuing play.
Any simple ways for this?
This is all on the root time line of course.
in addtion: I may want to do this w/in an MC too can I?
-AMTC
View Replies !
View Related
Time Delay
Hi
I have a count in at the start of my game, ie 3,2,1 and each count and graphic is on a seperate frame.
What do i need to do to set it up so each frame lasts a second and then moves onto the next??
Cheers
View Replies !
View Related
Time Delay Help
Hi, I've been having a hard time with setInterval and clearInterval functions.
This is my code:
counter = false;
function waitAwhile() {
this._alpha = 100;
counter = true;
trace (counter);
clearInterval (timer);
}
this.btn_rt.onRollOut = function (){
menu_clip.onEnterFrame = function() {trace (counter)
if (counter == false) {
timer = setInterval (waitAwhile, 3000);}
else {
this._alpha -=50;
counter = false;
}
if (this._alpha <=1){
delete this.onEnterFrame;
}
}
}
this.btn_rt.onRollOver = function (){
menu_clip.onEnterFrame = function() {
if (this._alpha >=99) {
delete this.onEnterFrame;
}
else {this._alpha += 50;
}
}
}
this.menu_clip._alpha = 0;
It's supposed to delay a clip by 3 seconds before it fades. it works the first time but but when I rollOut again, it won't delay.
I put a trace and it seems that the it didnt listen to the clearInterval function and it kept going. Shouldn't it have stopped my previous setInterval?
I really hope someone can help.
View Replies !
View Related
Time Delay
Hi...again,
does anyone know how to code a time delay? I'm running a mc with 24fps. and I though of an anymation coming up about 30 sec, after not interacting.....
thx,
m.
View Replies !
View Related
Time Delay
hi all,
I have a movie script on the stage.
After a delay of 3sec, I want the movie clip to move to a new location. I attached the following to an instance of the movie clip that is on stage:
onClipEvent (load) {
this._x = 200;
this._y = 200;
apause();
function apause() {
start=getTimer();
if (start>3000){
break;
}
}
this._x = 400;
this._y = 200;
}
It goes to the location 400,200 immediately without the delay.
What am I not doing right?
View Replies !
View Related
Help Me,about Delay Time
Hello;
i have two combobox, its is "c1" and "c2" ,Label in combobox one "0,1,2"
Label in combobox two is "1,10,100" , then select combobox one "1" and combobox two "10" and its go to distplay image1 in 5 seconds and image 2 in 5 seconds. how write actionscript?
help me,thanks you.
View Replies !
View Related
Time Delay
How would I go about in actionscript putting in a "play delay"?
for example, In layer 1 I have 10 frames. On the 10th frame is a stop(); and button that says:
Quote:
on (release) {
play();
}
So it would play, stop, and move ahead after 15 seconds or if the user presses the button. Something like in Gamespots little flash window. How would I go about doing this?
Cheers
View Replies !
View Related
Time Delay
Hi...again,
does anyone know how to code a time delay? I'm running a mc with 24fps. and I though of an anymation coming up about 30 sec, after not interacting.....
thx,
m.
View Replies !
View Related
Time Delay
hi all,
I have a movie script on the stage.
After a delay of 3sec, I want the movie clip to move to a new location. I attached the following to an instance of the movie clip that is on stage:
onClipEvent (load) {
this._x = 200;
this._y = 200;
apause();
function apause() {
start=getTimer();
if (start>3000){
break;
}
}
this._x = 400;
this._y = 200;
}
It goes to the location 400,200 immediately without the delay.
What am I not doing right?
View Replies !
View Related
Time Delay
Hi all,
I have a bunch of screenshots accompanied by sound clips,
each screenshot has its's own sound clip. Now I've created a
vcr like interface, but I want the movie to be able to play from beginning to end as an option.
Now, to do this I thought what could work is if I take the time (length) of a soundclip and tell the relevant screenshot (Frame) to delay playing for this amount of time. In this way someone could still navigate through or just press play and after every narration is done the timeline will advance to the next screen.
"THE QUESTION"
How do I set such a delay as a frame action? (or whatever you think might achieve this.)
View Replies !
View Related
Time Delay In Actionscript?
I have scripted an object to move across the screen.
I want it to stop at specific points and pause for a set period of time and then move to the next mark.
Any suggestions.
Currently I check _x of the object and then move +5 and loop.
View Replies !
View Related
Time Delay Within Functions?
Can anyone tell me if it is possible to put a time delay within a function.
I have a modular movieclip that moves another movieclip towards a target, but gives it that real motion effect.
The script for the modular mc is set over 3 frames
1. sets out the variables
2. has the bones of the action as follows
- finds out distance x and y between where the movieclip to be moved is at an instant and the works out the distance between it and the target x and y. This gives 2 variables that are the x difference and the y difference. These values are then divided by say 10 and then added to the original x and y position of the movieclip.
3. has the gotoAndPlay (2) command
so this modular movieclip controls the action of another.
Can i write this as a function?
i have a function to calculate the x and y difference and add on a fraction of this amount to the movieclip's current coordinates on press of a button. Continued presses move the movieclip towards its target in the desired way but i want all of this to happen on one press only.
i have tried loops to do this but it sends Flash into "i am not going to do as you want me to because i am going to perform so many calculations that i am going to crash" mode!!!!!!!!!!
i kind of new as i was coding that this was going to happen.
would some form of time delay within the function work?
maybe putting in a loop that only runs a certain amount of times as dictated by the initial distances calculated
i did try these but flash calculates too quickly for the eye to see and you have a movieclip instantaneously changing position - not the desired effect
I hope that i have explained myself clearly
Any help would be greatly appreciated
Happy flashing!!!!!!!!!1
View Replies !
View Related
Time Delay Without Loading
Hi,
I'm trying to put a pause in the first frame of a flash movie, this pause to last around 9 seconds. During those 9 seconds I don't want the rest of the flash ani to load. After the 9 seconds are up, the movie goes to the next frame and loads it. Is there a way to do this?
I've been to this webpage regarding time delay, but I can't get the thing working on mine.... If anyone knows that this script does what I want, let me know and I'll waste more time on it
http://www.flashbible.com/Members/Ac...Play/Delay.htm
Thank you
View Replies !
View Related
Simple Q: Time Delay
Hey all,
how can I delay my movie by, for instance, 5 secs.
I've read through different threads but appearently the time delay there was the minor problem and, though, nested in several other variables, so I couldn't find out what belongs to the code...
Can anybody give me the simple time delay command (getTimer?)??
Thanx ya'all!
Zacky!!
View Replies !
View Related
Time Delay After Preloading? Help
hi, hope u can help me......
here is the problem:
I have a swf root..... and when it's start, I load in 4 different levels (100 to 400) 4 swf... 2 of them are 350kb to 400kb.
the effect I wanted is..... when I arrive on the choice menu from the root swf..... if I click on the button and the specific movie is not loaded, it shows a preload process bar...... so i can go to any of the 4 buttons and can start to see the specific movie when it's completely loaded..... (and in the same time, the other can load in the background).... BUT
BUT
on the to large swf.... if i want to go there and start or see if it's loaded.... it shows me... well NOTHING for a while at the beginning and it wait for the others to almost finish their loading.... WHY? I though the 4 swf where starting to load simultanously.... what could be wrong????
I run out of ideas....
Thanks to all
Pascal from Paris/FR
View Replies !
View Related
Making A Time Delay
i'm making a slide show presentation for the company i work for and i want the movie to automatically jump to the next scene (after a certain amount of time has elapsed) without the user having to click a button every time to get to the next scene.
my question is:
is it possible to create a timer that counts down (say maybe 10 seconds - or long enough to be able to read some text on the screen) and then when it gets to zero, have it jump to the next scene?
i've been pulling my hair out trying to figure this out but i just can't get it.
any help would be most appreciated.
thanks!
View Replies !
View Related
Time Delay Using Actionscript - Is It Possible?
More variables, more dynamic text.
here's the website again: http://www.7inone.com/test4
if you go to Extras, Top Sites, Books you should see 5 stars at the bottom of the viewing space. As you rollover each star-button, text appears, and as you rollout it disappears.
First question:
The appearing/disappearing text is actually a MC placed WAY off the stage, and is repositioned on the rollOver, then returned to start position on rollOut. I would prefer to not have any instance of the MC on the stage, but be able to call an instance directly from the library, and then remove that instance on rollOver - is that possible? or something like it?
Second question:
The disappearing happens too fast. I want the text to remain for say 2 seconds AFTER rollOut before it disappears. Is that possible? Also, rather than disappear completely, can I make it fade away?
Now here's something a little more tricky - some users may move to button2 BEFORE the 2 second delay. In such a case, I want MC1 to be moved instantly, and be replaced by MC2 (the MC for button2).
Thanks for your help.
Sid.
View Replies !
View Related
Time Delay On Animation
I'd like to just make a simple continous animation, but unfortunately it has about 500 images that have to be shown, with a 12 second length on each frame....now I don't want this flash file to reach 35,000+ frames cause that would just make my life hell...lol.
I'm more of a director user myself, but this HAS to be done in flash (blame my boss :P)...so is there a way in action-scripting to put a delay on a movie clip? this will let me have only 500 frames with commands on them to finish playing, wait 12 seconds, then move to the next frame, instead of stretching out the tween the whole 12 seconds?
View Replies !
View Related
Random Delay Time On Mc?
I have two mc's in an array that I want to play at random intervals, the way I have it set up now is I am having it go through an array of 0-100 so that there is enough delay time in between, but this seems to slow down the entire swf considerable.
onClipEvent (enterFrame) {
for (mc=0; mc<=100; mc++)
myMcs = new Array(mc);
// as many as you want...
_root["mc"+Math.floor(Math.random()*myMcs.length)].play();
}
Is there a way to have it reference just the two mc's and then create a random delay time for them?
View Replies !
View Related
|