[FMX] Delay Of Movieclip
After pushing a button I like a movieclip to delay for lets say three seconds before it appear. This action don't have to repeats itself!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-01-2004, 06:36 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Delay MovieClip
Been working on a project, a Memory Game, I can only get it to show one card at a time and I would like it to show 2 cards a time and then flip the cards back over if the matching pair is not correct.
Thanks in Advance,
[FMX] Delay Of Movieclip
After pushing a button I like a movieclip to delay for lets say three seconds before it appear. This action don't have to repeats itself!
Movieclip Delay ?
Hi Flashers
IN My main scene 1 have a movieclip that I want to loop (play several times), with a 10 second delay each times.
Right Now I have put 30 empty frames in the beginning of the movieclip and no stop script. But I believe there is a actionscript line I can use instead and get rid of these emty frames ?
Anybody knows ??
Time Delay On Movieclip?
Hello,
I want to know how to put a time delay on movie clips so that they only play every 40 seconds or so. Could anybody point me in the right direction?
Thanks.
Time Delay On Movieclip?
For Flash MX.
How do I go about setting time delays on Movieclips using actionscript? Could somebody point me in the right direction as to what terms to look for or a sample piece of code to look at?
Thanks.
How Do You Delay A Movieclip Using Actionscript?
hello all,
I am attempting to make a "ribbon" like affect. I have little squares in a row. each square is the same movie clip that animates.
to make a mexican wave like affect i want to delay each movie clip a certain amount of time.
I've name each movie clip ribboni (where the "i" at the end is a number according to how much i want that movieclip to be delayed, going up in ten for each movieclip)
is it possible to use actionscript to delay each one starting till a certain point in time, using actionscript or will i have to do it using frames.
Attahced is what i have so far
thnx very much for any help i recieve...
How Can I Get This Delay Functionality With A Movieclip
Hello everyone,
I would highly appreciate your help with this one. I have a movie clip called box_mc on stage. I would like to have it go up 100 pixels with easeOut tween and then stay there for 3 seconds and then return back to its original position. I have been able to get the tween working but don't know how to program this functionality.
Please see my code. I am using IMC Tween classes and have implement a tween in a function.
Thanks a bunch.
Attach Code
#include "lmc_tween.as"
function initMenu(target:MovieClip)
{
target.tween("_y",-100,6,"easeOutElastic");
}
Trying To Archieve A Delay For Each Movieclip.
Hi there.
I hope someone can help me grasping the concept of delay.
My problem is the next.
I am making a kind of gallery using an xml file.
Now ,when i attach a movieclip for each generated item i have into my main mc,
"this movieclip is kind of a holder for an image with some information and a button"
They come up all at once ,
i would like them so show up ,for example 500 msec after each one.
so i thought i could accomplish this with setInterval ,
but with no luck for now
The code that attaches it is:
Code:
for (var g=offset; g < fin ; g++) {
var BoxHolder = moviecl.attachMovie("new_item","item"+my_counter, my_counter);
I tried to change this to:
Code:
myfunction(mc,attachmc,attachId,my_counter)
{
return BoxHolder = mc.attachMovie("attachmc","attachId"+my_counter, my_counter);
}
for (var g=offset; g < fin ; g++) {
setinterval(myfunction,500,"myID"+my_counter);
var Box =myfunction(moviecl,new_item,item,my_counter);
clearInterval("myID"+my_counter);
If anyone could help me or tell me how to accomplish this , would be greatly appreciated.
If i am not clear to you ,please let me know to see if i can explain it better.
Thanks in advance
Luck
How To Delay The Duplication Of MovieClip
Hello!! I have a problem here. I have a movieclip then i want to duplicate it. Before it duplicate, i want to set an interval??
Can you help me, cause i a newbie in actionscript...
Thankzzzzzzzz!!!!
Mc's That Subclass MovieClip Initialisation Delay
Hi,
A have an mc in my library("child_mc") that subclasses MovieClip. If I attach it to the stage at runtime, there are no problems accessing it's public properties.
In my library I also have an mc with a linkage ID "parent_mc". It does NOT subclass MovieClip, but does contain an instance of "child_mc".
If I attach parent_mc to the stage at runtime and immediately try to access the properties of "child_mc" it contains, I can't. The clip itself traces as existing, but and properties trace as undefined.
The only way round this is to set an interval of 1/100th of a second before I try and access it. Then I can access it fine.
Has anyone got a way round this? Am I doing something wrong?
Unwanted Delay When Playing A Movieclip
I have a swf that loads a movieclip which basically just plays a sound. The movieclip is set to play the sound, then gotoAndStop on the start frame for the sound. This is so it will be ready to replay the sound should the need arise.
I have a repeat button in the main swf that the user can click to play the sound from the movieclip again. The code in this button is simply _root.movieclip.play();
This works fine except that there is a 4-5 second delay from when you hit the button and the sound actually starts to play. Does anyone have any idea what could be causing this delay? I've been searching my code all night and can't find anything that could be wrong...it is just a simple play command. I've tried changing it to gotoAndPlay with the appropriate frame number but it still has the long delay.
Any ideas?
Delay Movieclip From Playing On Button Click
Hello
I'm sure there is an easy answer to this question, but for the life of me I can't figure it out.
I have a button in flash that onRelease causes one "animation to play" and "another to stop"
I also want this same button to call another movieclip but I want that movieclip delayed some so that "animation to play" can finish.
I would just call the second movieclip from the first animation but there are other buttons that trigger both "animation to play" and "another to stop" but trigger different delayed clips.
I have this:
Code:
on (release) {
_root.sat.beam.gotoAndStop(1);
_root.sat.gotoAndPlay(21);
var obj = new Object("_root.pages");
obj.interval = function(s) {
trace(s);
_root.pages.gotoAndStop(2);
};
setInterval(obj, "interval", 6500, "interval called");
}
and it actually works !!! but it keeps calling the interval at every "6500" after that. It does not seem to effect the movie in a bad way, but I only want it to call the interval once for every button release.
So I guess my question is if/how can this be achieved, or is there a better way alltogether?
Thank
Johnny
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®
Delay And Cancel Delay
Hello,
I'm having some trouble delaying single keyframes keyframe in flash.
I'm making a 5 slide slideshow over 5 frames. Each frame needs to last about 4000ms, although this is flexible.
BUT the 4000ms delay must be able to be reset when a button is pressed.
There are 5 buttons on the slideshow allowing a user to return to a previous slide or skip ahead without having to wait.
However the button when clicked switches frame but does not reset the delay set on the previous keyframe. So the whole slideshow goes out of sync until it just flashs different slides repeatedly. I've tried what I consider to be everything but as I am a novice I could do with the help of a pro.
The other problem I have which goes hand in hand with the one above is that I need the movie to pause and then resume when the mouse rolls over and rolls out from a particular area i.e. a button. But I have tried setting on rollover stop and on rollout play wtc (I know the syntax is wrong but I used the correct in the fla file) needless to say it doesn't work.
I have uploaded the fla file to here in case it helps: http://manage.merrions.com/slideshow.zip
I have attached the function i am using to delay each frame.
Thanks in advance
Chris
Attach Code
function wait() {
stop();
var myInterval = setInterval(
function () {
play();
clearInterval(myInterval);
}
, 6*1000);
}
wait();
15 Second Delay
can anyone help me with the scripting involved to create a 15 second time delay within a movie?
ie. count the time at whatever frame and when time = 15 seconds go to frame whatever.
thanks
Delay
Hi every 1
Does any1 nows how to delay the displaying af a text. Its like this: when you push button the movie goes somewhere and then display the text-file. Text file is in html., and it is the text i whant to delay for about 1-2 sec. before displaying.
Thanks.
From Denmark
Tony.
Delay
Please.... Would anyone no how to put a delay on a glint effect? I want the "glint" to shine across a word at a fast speed and then repeat again about 30 seconds after. If I use the Goto and play action it just repeats to quickly! Im not much of an action scripter or even a flasher, Im still a rookie. Please help!
P.S.~If you dont know what I mean by "glint" I found it under the text effects tutorial.
Delay
Can we set a delay at any frame in a flash movie and after the delay the playbackhead will automatically move forward, as we can set the delay in Director.
please help
Delay?
how to tell a movieclip to do something after a certain period of time, without any tweens?
thanks
Delay?
I'm using this code on a button:
on (release) {
lose.gotoAndPlay(2);
liberal.gotoAndPlay(2);
monop.gotoAndPlay(2);
comp.gotoAndPlay(2);
}
However, I want a delay between the clips - e.g clip1 plays, then a 0.5sec gap, then clip2 plays, then a 0.5sec gap etc etc. I cannot modify the contents of the MC, but can it be done with actionscript?
Thanks
Delay
hi,
i just want 30seconds delay in actionscript after that it will go nextframe.
Delay In MC
I have added the following script to the button
<
on (release) {
gotoAndPlay(10);
time=getTimer();
while ((getTimer()-time)<5000);
gotoAndPlay(1);
}
>
I want when this button is being pressed to play frame 10 , after that to make delay of 5 sec. and to play frame 1.
But Actually i am getting delay in 5 sec. without playing the frame 10 and only frame that is shown is frame 1.
Please help )
And if someone knows how to implement exit() function in Action script in order to terminate the application like quit button
Delay
Hello
how do i introduce a delay of 10 seconds in a single frame with the help of action script.
bye
geethanandh
Delay
Can I put a script on a frame that tells the movie to delay for example 30 seconds? Right now I'm using way to many frames to delay my movie and it's getting kind of frustrating.
Delay..
Hi I use this to create 15 duplicate in a new position.
for (x=0; x<15; x++) { duplicateMovieClip ("targetMC", "dupMC"+x, x); _root["dupMC"+x]._y = x*5;}
HOW can I give it a delay between the duplicates ?
Have a nice day :-)
Delay
Hi, I have teh following code wich speaks for it self:
Code:
if (random(300) ==99) {
tellTarget ("_root.home mouse down") {
play();
tellTarget ("_root.country mouse down") {
play();
tellTarget ("_root.links mouse over") {
play();
}
}
}
}
it will play certain movies at the same time. This is not the effect I would like to get....There should be a delay between the movies. How can this be done? ( delay= 1 sec)
thnx a lot!
Delay
hey guys how can i add a delay???
without using the timeline (in AS)
is there some kind of "sleep()" function like in win32???
Delay
At the end of a Flash 5 movie, i want to have a delay for few seconds and then replay it. What's the best way to do this with code instead of just extending the frames out to where I want it to loop?
Thanks,
John
Delay
Hello,
one thing i was never able to understand in Flash is how to create a delay not using empty frames. In this moment i have this code:
on (press) {
for (i=1; i < 10; i++) {
// I WANT TO INSERT A 1 SECOND DELAY BEFORE EACH FADE IN.
_root.content.showContent["designLine0" + i].fadeIn(5,50);
}
}
I want to insert a 1 second delay. How to do this?
Thanks,
Miguel
About Delay
I am using FLASH 5.0 and when i update flash player when i enter a page that haves a late version of FLASH the movies i did in FLASH 5.0 becomes delay whith not sincronism audio to the images?
I have reinstall the FLASH 5.0 and the movies i made start to work fine again, so i get into a site and again update and delay.
Why this happend?
What can i do?
Delay?
does anyone know how to delay the playhead in flash - say for 3 seconds as an example - cheers.
Delay
ive created this mask that moves with my mouse exactly when i move it. But now i want it to have some delay time. so if i move my mouse quickly, the mask slowly comes after. can anyone give me the script for this?
30 Sec Delay ?
I have a main movie that pulls in external swf files.
How would I create a 30 second time delay on the timeline of the main movie based on what is happening on the timeline of the loaded external swf?
Help With Delay.
Hi,
When my movie comes to the end, I use stop();
I want it to wait 30 seconds before going back to the first frame. Can anyone help me on how to delay a movie before looping back to the start?
I tried using something like this:
var count;
count = 1;
if (count<2000) {
count = count++;
} else {
gotoAndPlay(1);
}
But this did nothing. I'm using MX 2004 v7.
Thanks in advance,
-Meezee
If, Then With Delay, Else.. No Delay
Okay, I have this working perfectly.. if tops is open, close tops before opening bottoms, if bottoms is open close bottoms before opening tops.. works like a charm.. i just need to delay it by a certain amount of time.. say half a second..
but only if i need to close before opening... no delay needed if there is nothing to close...
any ideas?
sorry if that is confusing.. it works in my head
frame 1:
code:
closeTops=false;
closeBottoms=false;
function CloseTops() {
if (closeTops) {
_root.tops.gotoAndPlay(6);
closeTops=true;
} else {
closeTops=false;
}
}
function CloseBottoms() {
if (closeBottoms) {
_root.bottoms.gotoAndPlay(6);
closeBottoms=true;
} else {
closeBottoms=false;
}
}
Cheers
Delay
How do I delay something from happening in AS? Like i want some text to come up and then be there for say five seconds and then fade out and then have some other MC be loaded in....
if thats not a clear question let me know
Delay Help.
To make things a little clearer I'll add images
Ok heres the problem (as I hope u can see in the image).
I made an mp3 player for a clients site. The original
was frame based that a friedn showed me but so many
variables effected it's playback performance since the
player is loaded as a sub movie.
So I (with help again since I suck at AS - I'm more for
the design ) I made a timer which works very well if
you let it play straight through, but heres where the
problems appears.
PROBLEM:
10 scenes each using the same script just calling
different songs. the delay timer works fine HOWEVER
if you skip to another scene (song) and new timer starts
and the old one continues, the result the player sounds
like it starts skipping as it jumps to the next tract
when the original timer calls for it. the script and
layout is shown in the image...
What I'm looking for is help making a quick command
in frame 1 that unloads the timer. that way as it skips
along or if they skip it unloads the old timers in
frame 1 and starts a new one in frame 2 (what it does now).
Or if anyoneone has any other ideas. All help is appriciated.
T.I.A.
-Sketch
Delay Help
i have 9 movieclips and are all not visible when the movie loads.
what i want to happen is when i click a button, it will make the movieclips visible one at a time with a half second delay in between...i've trie using setInterval and it wont work. i would really be thankful for any help...
here is the code im using:
PHP Code:
//inside frame1:
Array.prototype.shuffle=function(){
for(i=0;i<this.length;i++){
var tmp=this[i];
var randomNum=random(this.length);
this[i]=this[randomNum];
this[randomNum]=tmp;
}
}
//inside button:
on (release){
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
arr.shuffle();
for (x=0;x<9;x++)
{
num1 = arr[x];
id = setInterval(disp7,500,num1);
}
function disp7(num:Number) {
clearInterval(id);
if (num == 1) {
face.a1._visible = true;
}
else if (num == 2) {
face.a2._visible = true;
}
else if (num == 3) {
face.a3._visible = true;
}
else if (num == 4) {
face.a4._visible = true;
}
else if (num == 5) {
face.a5._visible = true;
}
else if (num == 6) {
face.b5._visible = true;
}
else if (num == 7) {
face.c4._visible = true;
}
else if (num == 8) {
face.d3._visible = true;
}
else if (num == 9) {
face.e3._visible = true;
}
}
}
Set A Delay
How do I set the timeline to wait on a frame for a few seconds before moving on?
Thanks
ponayck
URL Delay
hi, I've recently been struggling with buttons with sound in a previous topic, but I eventually got it to work, but this time, when I assign the buttons to a certain webpage, with the code:
on (release) {
getURL("http://hem.bredband.net/roniish/index_gallery.htm");
}
it loads way to fast, the sound starts but then stops again, because the page loads way too quickly, so I was wondering if there's any delay you can enter so that the page doesn't load too quickly? Thanks.
Delay
hi
I have a problem I am coping with for hours now... Certainly there is a very easy solution^^ An actionscript-code would be the best solution for me.
There is a frame with to buttons - a back-button and a forward-button. If i release one of those another movieclip has to perform an action. after 9 framesof the movieclip the frame in which the movielip is placed has to go to the next frame... that means I need a delay of 2641ms (I got to know that time by tracing). I tried this code:
Code:
on(release){
i = 0;
zeit = 1;
//this is for the movieclip
if(funktionmc.weiter_up = true)
{
_root.funktionmc.gotoAndPlay(47);
} else {
_root.funktionmc.gotoAndPlay(32);
}
//my try to create a delay begins
function verzögerung(zeit)
{
while (i !== zeit)
{
gotoAndPlay(_currentframe + 0);
i++;
setInterval(verzögerung(zeit),2641);
}
}
verzögerung(zeit);
gotoAndPlay(45); //now the timeline should got to the next frame
}
I hope my English was good enough for others but me to understand...
Thanks in advance =)
[F8] Delay
I have some code
Code:
function ai(){
while(k<4){
duplicateMovieClip(flight, "compflight"+k,k);
k++;
}
}
creates 4 movieclips virtually simultaneously. I want a delay between each one appearing. Any ideas please?
A Way To Delay? In AS
So I have a FLA file that has bouncing basketballs that bounce across the stage. I have my code on the first frame of one of the layers. YEAY everything works fine and dandy. My question is, is there a way to say in AS don't start any sort of animation for 5 seconds. Becuase when I publish or test this movie it starts right away. I need about a 4 second delay. How is this accomplished anyone???
~**~~**~
What Can Be The Cause Of The Delay?
I have a swf online showing my brother's performing calendar. It collects information from a couple of xml-files and some textfiles, then puts it all together, picking the appropriate logo's and images.
Everything works fine offline, but once online, the trouble starts. Some people get just the spinning logo. Renewing the window a couple of times helps, but sometimes some fields are still "undefined" until another renewal. Who knows
What's going on?
The file 's here:
http://users.pandora.be/vitalsoundfiles/aagenda.html
Thanks for having a look!
Delay?
hey there,
i am looking for a 'delay' parameter for the mx tweening classes.
i don't see one and am looking for a way to sequence the following animations.
TWO QUESTIONS:
1) IS THERE A DELAY PARAMETER?
2) IF NOT, HOW DOES ONE SEQUENCE ANIMATIONS USING THE BUILT-IN MX CLASSES?
here's the code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
function startMeUp():Void {
this.createEmptyMovieClip("holder", 2);
//load up all elements
holder.attachMovie("bravoLogo", "bravoLogo_mc", 4, {_x: 585, _y: 10});
holder.attachMovie("background", "background_mc", 1, {_x: 0, _y: 0});
holder.attachMovie("headline", "headline_mc", 40, {_x: -6, _y: 6});
holder.attachMovie("shouldShe", "shouldShe_mc", 60, {_x: 30, _y: 37});
holder.attachMovie("frame1", "frame1_mc", 20, {_x: 30, _y: 35});
holder.attachMovie("frame2", "frame2_mc", 19, {_x: 30, _y: 35});
holder.attachMovie("frame3", "frame3_mc", 18, {_x: 60, _y: 44});
holder.attachMovie("kathyImage", "kathyImage_mc", 17, {_x: 170, _y:-20});
holder.attachMovie("kathyLogo", "kathyLogo_mc", 12, {_x: 466, _y: 5});
holder.attachMovie("starburst1", "starburst1_mc", 11, {_x: 466, _y: 0});
holder.attachMovie("starburst1", "starburst4_mc", 10, {_x:105, _y: 60});
holder.attachMovie("starburst2", "starburst2_mc", 9, {_x: 498, _y: 18});
holder.attachMovie("starburst3", "starburst3_mc", 8, {_x: 469, _y: 54});
holder.attachMovie("starburst1", "starburst1vn_mc", 7, {_x: 32, _y: 60});
holder.attachMovie("starburst2", "starburst2vn_mc", 6, {_x: 180, _y: 45});
holder.attachMovie("starburst3", "starburst3vn_mc", 5, {_x: 170, _y: 72});
new Tween(holder.kathyImage_mc, "_alpha", easeIn, 0, 100, 3, true);
new Tween(holder.kathyImage_mc, "_scale", easeOut, 0, 100, 3, true);
new Tween(holder.starburst4_mc, "_rotate", easeOut, 0, 1020, 2, true);
new Tween(holder.starburst4_mc, "_alpha", easeOut, 100, 0, 3, true);
new Tween(holder.shouldShe_mc, "_alpha", easeOut, 0, 100, 4, true);
new Tween(holder.shouldShe_mc, "_alpha", easeOut, 100, 0, 4, true);
new Tween(holder.frame1_mc, "_alpha", easeOut, 0, 100, 3, true);
new Tween(holder.frame1_mc, "_alpha", easeOut, 100, 0, 3, true);
new Tween(holder.frame2_mc, "_alpha", easeOut, 0, 100, 3, true);
new Tween(holder.frame2_mc, "_alpha", easeOut, 100, 0, 2, true);
new Tween(holder.frame3_mc, "_alpha", easeOut, 0, 100, 3, true);
new Tween(holder.starburst1_mc, "_alpha", easeOut, 0, 100, 1.5, true);
new Tween(holder.starburst1_mc, "_rotate", easeOut, 0, 1020, 4, true);
//want this one to be delayed by 6 seconds
//new Tween(holder.starburst1_mc, "_rotate", easeOut, 0, 1020, 4, true);
new Tween(holder.starburst2_mc, "_alpha", easeIn, 0, 100, .5, true);
new Tween(holder.starburst2_mc, "_rotate", easeOut, 0, 1420, 3, true);
//want this one to be delayed by 11 seconds
//new Tween(holder.starburst2_mc, "_rotate", easeOut, 0, 1420, 3, true);
new Tween(holder.starburst3_mc, "_alpha", easeIn, 0, 100, 2, true);
new Tween(holder.starburst3_mc, "_rotate", easeOut, 0, 1620, 3, true);
new Tween(holder.starburst1vn_mc, "_alpha", easeIn, 0, 100, 2, true);
new Tween(holder.starburst1vn_mc, "_rotate", easeOut, 0, 1620, 10, true);
new Tween(holder.starburst2vn_mc, "_alpha", easeIn, 0, 100, 2, true);
new Tween(holder.starburst2vn_mc, "_rotate", easeOut, 0, 1620, 10, true);
new Tween(holder.starburst3vn_mc, "_alpha", easeIn, 0, 100, 1, true);
new Tween(holder.starburst3n_mc, "_rotate", easeOut, 0, -1620, 6, true);
holder.frame3_mc.onRelease = function () {
getURL("http://www.theredlevel.com", "_self");
}
}
How Do I Add Delay?
ActionScript Code:
red.addEventListener(MouseEvent.MOUSE_DOWN, redhit);
function redhit(event:MouseEvent):void {
red.gotoAndPlay("redCLICK");
green.gotoAndPlay("greenOFF");
blue.gotoAndPlay("blueOFF");
}
How do i add a delay between these commands so that they dont go off at the same time when i click the button?
Get Url Delay
How can I delay getting the url by about 5 seconds to allow the flassh movie to completely finish.
TY
BC
m35bob
How Can I Delay?
Do you know how I can delay or slow down the transition to the next frame without manually stretching the frames on the timeline? How should I write my actionscript in order to do that? Thanks in advance!
|