Can You Create A Delay In Specific Frame?
I am trying to create a frame that loops for "x" amount of time before it goes to the next frame. Can this be done? And how. I know it is part of Action Script but am unsure in what combination.
Flapman
Tek-Tips > Adobe(Macromedia): Flash Forum
Posted on: 23 Apr 02 18:30
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Could I Create Delay In An Specific Frame?
Hi
In last frame of my movie I have some code like this on:
gotoAndPlay(125);
Now I want to pause my movie in last frame for 10 seconds and then execute above code .
How can I do it with AS 2.0?
[F8] Can I Create A Hyperlink To A Specific Frame In My .swf File?
Hi There,
I am realitively new at flash. In my movie I have linked to a different site and I want to set it up so that when the user hits their browsers back button that instead of loading all the preloading parts of my movie that it justs takes them back to where they left off at say frame 63. Is that possible?
Thanks for any help on this.
If Timeline Came From (specific Frame Of Any Scene), Go To (specific Frame)
Hi, I have thirteen scenes, each one has 2 frames, one with audio (loadSound) one without. What's the best way to tell flash when a user clicks on a nav button (which calls a scene) to go to the 1st or 2nd frame of the scene depending on if the previous scene was playing the 1st or 2nd frame?
Thanks in advance.
Specific Html Page Triggers Specific Frame Of The Flash Movie
I have been playing with flash and html and wonder if any of you have a bright idea on how to do this.
I have a flash movie, which I call from html but depending on which part of the html page I call it from I want to start it at a particular frame and not always from the beginning.
I have created a variable within the movie in action script and given it a different value for each of the frames I want to start the movie at, and want now to designate the value I give to that within html so that the movie “jumps” to the correct frame. Is this possible or am I totally crazy??
How To Load Specific Frame Of Specific Movie On Another Layer
Here's my setup:
Layer 0 = main movie
Layer 1 = navigation movie
Layer 2 = products.swf
Using a button located on Layer 1 (that contains navigation.swf), I need to load on Layer 2 the products.swf, and it needs to land on frame 54 of that movie.
I'm fairly illiterate r.e. ActionScript, so go gentle on me, please, LOL
Thanks!!!!!
Tell Frame To Change If A Specific Frame Combination Is Loaded
To get a better idea of what Im talking about please check my flash page. http://www.munktiki.com/Munk-e.htm
You can see that when a different munk-e color is selected and you have his ear extentions on(bottom left in the piercings menu)that the colors dont match.
So.... when the color movie/orange frame is selected and the earring movie/ear extensions frame is selected then the orange frame will tell the earrings movie to go to the correct corrisponding color earring.
Man I hope this makes sense, it barely does to me.
Hope someone can help
Help Load A Movie (and Frame) On A Specific Frame In My Timeline
I need to Load a movie and go to a specific frame within that loaded movie.
I know how to do this "on press & release" commands but how do I get it to load when a certain frame is reached in my timeline.
Example. When finished preloading it plays frame 25. When it gets to frame 25 I wan't a movie to load and start on a certain frame.
If you need more info or I am not making myself clear, please let me know.
Thanks in advance.
How Do You Create Time Delay?
How do you create time delay for 3 minutes in a move and then start playing after the delay time is up? Any suggesttions would be great. Thanks.
Create A Delay Between An Effect In AS
Hi there,
I have found a nice colour burn effect and now im trying to work out how to set a delay before/after it is called. Mainly so I can have a few seconds before I load another image. I know it has something to do with setInterval but not sure how to do it for this function...
PHP Code:
MovieClip.prototype.fadeWhite = function() {
var t = 0;
var ease = 25;
var myColor = new Color(this);
var cto = myColor.getTransform();
myColor.setTransform({ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0});
var cWhite = myColor.getTransform();
this._alpha = 0;
this.onEnterFrame = function() {
this._alpha += 10;
if (this._alpha>100) {
this._alpha = 100;
t++;
for (var c in cWhite) {
cWhite[c] += (cto[c]-cWhite[c])/ease;
}
myColor.setTransform(cWhite);
if (t>400) {
myColor.setTransform(cto);
delete this.onEnterFrame;
}
}
};
};
pic.fadeWhite();
Many thanks!
How Do I Create A Time Delay For Actions?
I'm using Flash 5, and have an MC that begins on the mouse rollover, and then returns to the start on mouse rollout (i.e. a button), but I want to include an action inbetween that automatically starts the rollout action after a period of say, 10 seconds, whether the mouse is over the MC or not.
Any ideas?
boxx42
Create 1/2 Sec Delay DuplicateMovieClip() At Each Duplication
hi
I have been scatching my head as how to create a delay when duplicating a movie clip using duplicateMovieClip() between each new one created
Code is below
var total:Number = 12;
var i:Number = 0;
while (i<=total) {
//trace("i is "+i);
_root.whiteBox1_mc.duplicateMovieClip("newBoxA_"+i , i, {_x:i*20});
_root.whiteBox1_mc._alpha += increment;
//need to add something here to have slight pause
//tried getTimer & setInterval already to no avail
i++;
}
gotoAndStop("2nd");
This pause will have to be used when I add 7 more rows as I need a pause between them and they are all showing up with no animation and I need it to look like a waterfall effect.
Pretty desperate to get this sorted asap.
Any help will be greatly appreciated
Thanks
AttachMovie Delay - Trying To Create An Hourglass
Hi all,
I have some functions that are taking 5-15 seconds to execute and I'd like to display an hourglass while the script is running. Since there are several scripts that take a while to load stuff I'd like to make it a global function in frame one, something like this:
Code:
function f_displayHourglass (ab_hourglass) {
if (ab_hourglass == true ) {
Mouse.hide();
_root.attachMovie("mc_hourglass","mc_hourglass",1000);
_root.mc_hourglass._x = _root._xmouse;
_root.mc_cursor._y = _root._ymouse;
} else {
Mouse.show();
_root.mc_hourglass.removeMovieClip();
}
}
Then in my functions I'd just like to call this function at the start and end, something like:
Code:
function f_longFunction() {
_root.f_displayHourglass(true);
// A bunch of script that takes
// 5-15 seconds to execute
// resides here
_root.f_displayHourglass(false);
}
The problem here is that the attachmovie doesn't actually attach the movie until after the script executes so the hourglass never shows up. Works fine if f_displayHourglass is called on a different frame (ie Frame1=f_displayHourglass(true); Frame2=f_longFunction(); Frame3=f_displayHourglass(false)) but I can't do this with my movie (or at least it would take too long to change it that way for all the places I want to insert this).
Found a promising thread here: http://www.actionscript.org/forums/s...d.php3?t=68966
However, since I need this to be a global function I'm not sure how to apply that logic to work in my situation.
Any help, or suggestions on easier ways to do this would be greatly appreciated! thanks
Michael
Create A Delay Function In Flash 8?
Hi all,
I try to create a separate delay function, so that I can execute sequentially:
functionA();
delay();
functionB();
I previously user timer so I had to integrate function B into the delay function, which is very inconvenient.
Could anyone please help me to create a separate function as above?
Many thanks.
Create Full Screen AFTER Time Delay
hi.. i hardly ever have to use html or java (like most of the people here) but everybody has to know enough to get along, dont we?
the problem: i need to redirect people from one site to another site.. but only after a time delay, lets say 10 seconds.Also, the new site has to be in a full screen window. I know the html/java to create these two effects seperatly (redirect after a time delay and create a full screen)but not together. i tryed using flash, with a 10 second long movie in the first web page, and then using a get url at the end to activate the java in the movie's holder:
<script>
function fullwin(targeturl){
window.open(targeturl,"","fullscreen,scrollbars")
}
//-->
</script>
i put the target url in the flash movie (i havnt got a clue if this correct):
getURL javascript:fullwin("THE URL HERE");
so.. where have i gone wrong, or dont i need flash at all?
Create A Time Delay Between Functions In An Array
Hi
Im allowing the user to popluate an array with functions calls containing sound object scripts. This all works fine and the functions are called in the order that the array is populated. The functions contain sound object scripts each starting a different sound loop of 5.853 seconds in duration. My problem is this; When they are called they play at the same time (on top of each other)... i need them to play after each other. For instance, when the 4th entry of the array has completed its 5.853 seconds, i need the 5th entry in the array to start its sound loop..and so on through the array.
Does anyone know how i can get the functions to play after each other rather than over each other?
On the first frame of the main timeline i have this script:
myArray = new Array();
myFunction1 = function () { intro2 = new Sound();intro2.attachSound("intro2");intro2.start( );trace("You called function 1");};
myFunction2 = function () { section1 = new Sound();section1.attachSound("section1");section1. start();trace("You called function 2");};
On the buttons that populate the array i have these scripts:
on (release) {
_root.myArray.push("_root.myFunction2");
trace(myArray);
}
on (release) {
_root.myArray.push("_root.myFunction1");
trace(myArray);
}
To call the functions, i have a button with this script:
on (release) {
for (i=0; i<_root.myArray.length; i++) {
functionToCall = eval(_root.myArray[i]);
functionToCall.call();
}
}
I'm testing the script using only two sounds, but the final application will contain about 30 different sounds (all 5.853 seconds), and the array can be populated in whatever order the user wants (it's basically a really primitive attempt at a music sequencer in Flash).
Any help would be greatly appreciated
Thanks
boonos
Create A Simple Time Delay In The Timeline
Hello,
I am having a heck of a time coming up with what seems like it should be some simple lines of script. When my movie clip gets to say Frame 10, I want it to first "Stop", then "Wait" (for 2 seconds), then "gotoAndPlay (2). And when it gets back to Frame10, I want it to do the same thing again... and again... and again. I will then initiate an action (button click) that will stop this loop and move to another part of the movie clip. That part is fine and so is the looping between frame 10 and frame 2, it's just adding in the "time delay" after the "stop" that's giving me headaches.
Any help - greatly appreciated.
Steve
How To Create A Time Delay Prototype Script
problem:
how to create a time delay prototype script.
situation:
click on buttons to run a display mc1 after 2 sec delay
//script on button//
on (press) {
_root.mc1.wait();
}
script needed:
MovieClip.prototype.wait = function() {
_root.mc1.gotoAndPlay(2);
this.clearInterval(this.setInterval(wait, 2000));
}
thanks
How To Create A Time Delay Prototype Script
problem:
how to create a time delay prototype script.
situation:
click on buttons to run a display mc1 after 2 sec delay
//script on button//
on (press) {
_root.mc1.wait();
}
script needed:
MovieClip.prototype.wait = function() {
_root.mc1.gotoAndPlay(2);
this.clearInterval(this.setInterval(wait, 2000));
}
thanks
Trying To Create Specific Effect -please Help MX
Hello,
My stage is set up as so. I have five buttons across the top, and I have one thin vertical line of color and one thin horizontal line of another color. Rule lines. These two intersect, what I want to do is when a user clicks a button, these lines will move or shift to a new position or coordinate on the X and Y grid. A new position for both of these, one for each time a button is clicked. My question is, how do I get these lines to move or react and move to the a certain coordinate point each time a button is clicked. I have attached a .fla with the basic layout and start of the file, it may help visualize what I am explaining. I do not even know where to begin to create this, anyones help and expertise is greatly appreciated. Thanks
Nick
Delay Frame Unless On The Destination Frame
Hi all I am new to this. Just need a little advice on stopping delayed frames once on my desired frame.
My code - AS2
// Buton that Jumps to frame AVTintro
AVTvideo.onRelease = function() {
_root.gotoAndPlay("AVTintro");
}
// Pause Farme
myPauseLXT = function() {
clearInterval(delayLXT);
_root.gotoAndPlay("AVTintro");
}
// Setting delay time
delayLXT = setInterval(myPauseLXT, 20000);
stop();
I am delaying my current frame by 20 seconds after this it will gotoAndPlay("AVTintro")
I also have a button that onRelease will gotoAndPlay("AVTintro") so that if the user doesn’t want to wait 20 seconds they can jump strait to the "AVTinto" frame.
My problem is that if the user uses the button and goes to the "AVTinto" frame then after 20 seconds it jumps back to the start of the frame. I have an .flv playing on that frame as well as other tweens.
I need a way to stop the 20 second delay once on the "AVTinto" frame.
I have tried making it false onEnterFrame "AVTinto" and delete onEnterFrame "AVTinto"
I have tried
// Pause Frame
myPauseLXT = function() {
clearInterval(delayLXT);
_root.gotoAndPlay("AVTintro");
if (frame == "AVTintro") {
myPauseLXT = false // and tried null
}
I have used every variation I can think of these examples but no luck
Thanks in advance for any help
edit:
I was thinking maybe a delete/false action on the AVTvideo button
AVTvideo.onRelease = function() {
_root.gotoAndPlay("AVTintro");
myPauseLXT = false // something like this
}
Delay Frame Rate Of Particular Frame
Hi,
Can someone teach me how to delay the frame rate of particular frame in an MC?
eg. an MC with 20 frames, frame rate is 30 fps. when it runs to frame 19, i'd like to make it run at 15 fps. and it goes back to normal (30 fps) again.
How can I do this?
Thanks for help!
Create A Variable On A Specific Object
I would to know the state of my checkbox
here is the code
Code:
on(release){
if(this._name[checkBoxState] == undefined || this._name[checkBoxState] == false){
this._name[checkBoxState] = true;
this.gotoAndStop(2);
}
else{
this._name[checkBoxState] = false;
this.gotoAndStop(1);
}
trace(this._name[checkBoxState]);
}
I would to merge the variable on the name of the button because I will have more than 1 checkbox on the screen. Is there a way of doinf it ?
Help: How To Go To Specific Frame Automatically When Hit A Certain Frame?
Im trying to make a project where i have a set of picture "destination" and when you click on a button on that picture, it takes you through a series of pictures that plays automatically, but when it finishes, I want it to go back to a different picture destination automatically that wouldn't be the frame right after the one that just played.
All I know is how to go to different frames with buttons with the onrealease gotoandstop/play stuff but don't know how to make them go to a frame when playing without the use of a button. please help!
Frame Delay
Hi guys and merry Christmas.
I wonder if anyone out there can able to tell me how to delay frame before going to the next frame? For example, delay 10 seconds before going next frame. For this i no longer have to strech long timeline just to do the delay. Any help would be greatly apprecited. Thanks
Frame Delay
Not sure how complicated what I want to do is, but here goes. Basically I have a series of buttons. When one of these buttons is clicked I need to move to another point in another movie clip but only after a delay of a certain number of frames (to allow time for another clip to do something). I have tried using setInterval but this does not work as this is time based independently of the timeline so does not always correspond (or so I'm led to believe). Would a better way to achieve this be to use an onEnterFrame loop? If so could someone tell me how? Any help would be greatly appreciated.
Frame Delay
Not sure how complicated what I want to do is, but here goes. Basically I have a series of buttons. When one of these buttons is clicked I need to move to another point in another movie clip but only after a delay of a certain number of frames (to allow time for another clip to do something). I have tried using setInterval but this does not work as this is time based independently of the timeline so does not always correspond (or so I'm led to believe). Would a better way to achieve this be to use an onEnterFrame loop? If so could someone tell me how? Any help would be greatly appreciated.
Delay Frame
how does a person go about delaying a certain frame.
Frame Delay
I want to be able to click a button, run a small movie clip and then hold any designated frame of the movie clip for about 5 seconds before progressing to the next frame in the main timeline.
(it's a quiz & I want to be able to indicate whether the answer is right or wrong before going to the next question which is on the next main timeline frame).
Any help offered please?
Richard
Delay Frame
Hi guys.
Just wondering if anyone knew the code to delay the timeline for lets say 10 seconds when it enters a frame?
Thanks any help would be much appreciated!
As3-frame Delay
Say i have 5 frames on timeline...how can I delay each frame for x amount of seconds?
How To Delay A Frame Before Goes To The Next One?
Hi!
I want to know if somebody knows how can I delay a frame before it jumps to the next one?
A better explanation of the problem...
The project is a slideshow.
3 layers:
- the first is for actions;
- The second have 4 KeyFrames, each one with an image;
- The third has 4 frames (4 in 1, not KeyFrames) with 4 buttons ("back", "pause", "play" and "forward").
The "back" button has this action:
on (release) {
prevFrame();
}
The "pause" button has this action:
on (release) {
stop();
}
The "play" button has this action:
on (release) {
play();
}
The "forward" button has this action:
on (release) {
nextFrame();
}
When I put this code on each frame action
stop();
//set a value for the delay
time = 3000;
//need to give the delay an ID so we can clear it later
delay = setInterval(proceed, time);
function proceed() {
//clear the interval
clearInterval(delay);
//go next frame - or whatever you want to happen here
play();
}
, it works, the problem is that the actions in the buttons aren't right, cause it look like the timer don't stop every time I jump frame.
How can I resolve that?
Tks for your time
Frame Delay
Hi everyone.
I want to delay the movement from a frame to the next by 2 or 3 seconds for example. How i can do this with actionscript?
please help,
Frame Delay
Hi there,
I'm stumped on time delay, I need to know how to delay a frame from playing until a certain time has elapsed.
Let's take that one step further, say I have a bunch of mp3's in my library and they all have linkage names, aaaand I attach these clips with frame actions every time the relevant graphic appears, (Question) Is it possible, to set the delay for the frame equal to the length of the soundclip with the linkage name.
How?
Frame Delay
Sir/Mam, upon display if i want to make a frame wait for few time units(say 2 sec) what am I suppose to do in flashmx.
Delay Frame
Hi guys.
Just wondering if anyone knew the code to delay the timeline for lets say 10 seconds when it enters a frame?
Thanks any help would be much appreciated!
Frame Delay
Sir/Mam, upon display if i want to make a frame wait for few time units(say 2 sec) what am I suppose to do in flashmx.
The One Frame Delay
I can not remember the reason for this problem so I was hoping one of you guys could enlighten me, and maybe provide a solution.
I have a movie clip called "Monkey" sitting in the library and in that movie clip is another movie clip called "Banana". Monkey has a function on the first frame called "Funky".
Now, in the main time-line of the movie I am attaching Monkey to the stage and trying to call the Funky function, but the Funky function does not seem to want to work until Monkey has reached frame 2.
Code:
// Main time-line code
function doStuff():Void
{
attachMovie("Monkey", "Monkey_mc", getNextHighestDepth());
Monkey_mc.Funky();
}
doStuff();
The problem still arises even if I call the Funky function from within the Monkey movie clip (on the first frame).
Code:
// Monkey code on frame 1 (does not work)
function Funky():Void
{
// do some funky monkey stuff to the Banana movie clip
}
Funky();
However, if I put the Funky function on the second frame every works as planned.
It is not a problem with the actual code (trust me) but seems to have something to do with how/when the movie clip(s) initiate.
Any ideas?
Frame-delay
just thought I'd share a funny effect.
create a flash-file with massive motion and form tweens, transparency effects and stuff, simply the stuff that really kills the processor - much much motion.
and then create a HTML file containing this file TWICE, just like next to each other ... and then have this file open for quite some time ... and watch how one flash file starts running slower than the other ... ... kinda weird. I couldn't really find out if there was a certain flash file running slower than the other, because it really changed whenever I reloaded the site ... !!
just a strange effect ...
How To Delay A Frame Before Goes To The Next One?
Hi!
I want to know if somebody knows how can I delay a frame before it jumps to the next one?
A better explanation of the problem...
The project is a slideshow.
3 layers:
- the first is for actions;
- The second have 4 KeyFrames, each one with an image;
- The third has 4 frames (4 in 1, not KeyFrames) with 4 buttons ("back", "pause", "play" and "forward").
The "back" button has this action:
on (release) {
prevFrame();
}
The "pause" button has this action:
on (release) {
stop();
}
The "play" button has this action:
on (release) {
play();
}
The "forward" button has this action:
on (release) {
nextFrame();
}
When I put this code on each frame action
stop();
//set a value for the delay
time = 3000;
//need to give the delay an ID so we can clear it later
delay = setInterval(proceed, time);
function proceed() {
//clear the interval
clearInterval(delay);
//go next frame - or whatever you want to happen here
play();
}
, it works, the problem is that the actions in the buttons aren't right, cause it look like the timer don't stop every time I jump frame.
How can I resolve that?
Tks for your time
How To Delay A Frame Before Goes To The Next One?
Hi!
I want to know if somebody knows how can I delay a frame before it jumps to the next one?
A better explanation of the problem...
The project is a slideshow.
3 layers:
- the first is for actions;
- The second have 4 KeyFrames, each one with an image;
- The third has 4 frames (4 in 1, not KeyFrames) with 4 buttons ("back", "pause", "play" and "forward").
The "back" button has this action:
on (release) {
prevFrame();
}
The "pause" button has this action:
on (release) {
stop();
}
The "play" button has this action:
on (release) {
play();
}
The "forward" button has this action:
on (release) {
nextFrame();
}
When I put this code on each frame action
stop();
//set a value for the delay
time = 3000;
//need to give the delay an ID so we can clear it later
delay = setInterval(proceed, time);
function proceed() {
//clear the interval
clearInterval(delay);
//go next frame - or whatever you want to happen here
play();
}
, it works, the problem is that the actions in the buttons aren't right, cause it look like the timer don't stop every time I jump frame.
How can I resolve that?
Tks for your time
Delay At Frame
Hi,
Is it possible to make the movieclip delay (lets say stop for 1 second..) in one frame using actionscript instead of including more equal frames?
Thanks
Paulo
|