ActionScript 2.0 :: Looping Through Functions?

Mar 30, 2009

I thought looping through functions would be pretty easy but i've been working on it for some time now and haven't managed to make it work.What i wanna do is:1) Run function 12) After 40 secs run function 23) After 80 secs run function 34) After 120 secs run function 45) After 160 secs run function 1 again6) Back to step 2Maybe i confused you with these steps, what i mean is i wanna run a function and wait 40 secs before running the next.And basically i want this to go on forever. I've tried some stuff with setTimeout and setInterval, maybe i used them in a wrong way, but as i said i didn't manage to make it work.

View 2 Replies


Similar Posts:


Looping Background While The Site Still Functions?

Jun 22, 2009

Like I said in the title. I want to loop my background/a single element, while my people can click on the nav bar and look at stuff on the website.I attached what i was working on. The headphones will be fading in and out between a few different pairs. Mean while I need the nav bar fuctional and not changing besides when they click.

View 3 Replies

ActionScript 3.0 :: Looping AddEventListener With Functions

Jun 17, 2009

this a sample code that im currently using...but i need to find a way do this long script, as simple as possible...

[Code]...

different buttons have different functions, so how can i add the functions by looping them?

View 2 Replies

ActionScript 2.0 :: Looping Functions, It Just Skips To The Last Instance

Jul 2, 2008

I am using Actionscript and the problem I am having is the I am running a for loop to execute a function which loads the variables from XML and then another function to load an external SWF which will load the variables from the first function. Here is the code snippet

for(i=0;i<2;i++) {
createproduct();
displayproduct();
}

Currently, createproduct will create a series of arrays with the new data. The displayproduct() function pushes the data out into a image loader. However, my guess is that the loop is executed so quickly, that the data becomes the last instance in the for loop and therefore displays the same(last instance) data for both displayproduct function. Is there any way to have a function wait till the previous function completes? That way when I fun the script, it will show up 2 instances of the image loader with the appropriate data.

View 3 Replies

Separating Looping Anims From Non-looping?

Feb 2, 2010

The issue I am running across is this: I encoded and embedded a movie clip to act as the background. There are other animations that can and will loop, as the movie resets itself. But there are some elements that I only want to run once and not repeat once the embedded movie loops (link introductions, where objects fly in and transition into the button). How can I set the one time animations to fire just once, while keeping the embedded animation on a loop?

View 1 Replies

IDE :: Singling Out Non-looping Anims From Looping

Feb 2, 2010

I am fairly new to Flash and I am constructing a website. The issue I am running across is this: I encoded and embedded a movie clip to act as the background. There are other animations that can and will loop, as the movie resets itself. But there are some elements that I only want to run once and not repeat once the embedded movie loops (link introductions, where objects fly in and transition into the button). How can I set the one time animations to fire just once, while keeping the embedded animation on a loop?

View 1 Replies

Actionscript 3 :: Calling Functions In Functions And Avoiding The Player To Crash / Hang?

Oct 6, 2011

I have a series of calculations i'm doing over a bunch of objects stored in a array. Each function is pretty CPU demanding but if you only run one function, it just works fine.

[Code]...

View 2 Replies

ActionScript 3.0 :: Import Vs Include - Basic Functions To Be In BasicFunctions.as And The Make A Library For More Specific Functions

Jun 6, 2010

I've got a project thats getting a bit big, so Im taking the actionscript out into separate as files. I want all the basic functions to be in BasicFunctions.as and the make a library for more specific functions. I find that a lot of people use the import statement but I cant get that to work with a simple Hello World trace, yet the include statement works fine (see attached). I understand that import/include work differently, but which is the better method? If import, then is that heavier to work with. Any rate, what's the best way to organise code when it gets to the 1000+ lines?

[Code]....

View 9 Replies

ActionScript 3.0 :: Mimicing The Until Functions - Load Of Global Functions In One File?

Nov 4, 2009

I'm trying to find a way to have global functions in my as project, similar to how flash does with stuff like the util functions (describeType()...), where you can just call the function wherever you need it. For example:

[Code]...

So when I call Test(), it prints out "hello world" fine. My problem comes in that I can't change the name of the Test function, and I can't add any other functions without compiler errors. Is it possible to have a load of global functions in one file, or do I have to split them up into separate files like in the example? Also, I know that I can make a Global class and call static functions like Code: Global.doSomething() but I'd like to know if there's a way to do it as flash does it (describeType(), getDefinitionByName(), etc), or rather, how does flash do it?

View 9 Replies

ActionScript 2.0 :: Call Other Functions From Generic Mouse Event Functions?

Nov 25, 2010

Is it not possible to call other functions from generic mouse event functions?

Code:
_root.myButton.onPress = function(){
hide();

[code]......

View 6 Replies

ActionScript 2.0 :: Functions And Sub-functions - Button Doesn't Work OnRelease?

Jun 17, 2004

I have one function that puts text in a text field and makes a button goto a url onRelease.The code is like this:

Code:
item.onRelease = function() {
myButton.onRelease = function() {
getURL("http://google.com", "_blank");
}
talk = this.txt;
}
the only problem is that the button doesn't work onRelease. i think that it is because there are too many functions there, but at the same time,

View 5 Replies

ActionScript 2.0 :: Multi-functions -values Of (12) And (21,39) Are Lost At The Geo And Geo1 Functions ?

Dec 2, 2004

in this example why the values of (12) and (21,39) are lost at the geo and geo1 functions

[code]...

View 11 Replies

Flash - Add Functions To Playerglobal.swc Or Allow Compiler To Pass Own Functions

Oct 25, 2011

Im adding lot of simple functions to prototypes of top level objects ( Object , Array , String ...) and have 2 questions :

Is possible to add functions to top level's classes in compile-time ?

If not , is there a way to allow this functions to compile ? I dont like to turn off strict mode

ex:

string.removeWhiteSpace();
string.sliceStr("." , "end");
textField.scrollBottom();

this return compile-time error , cause there is no such function , i have to write it in braces :

string["removeWhiteSpace"]();
string["sliceStr"]("." , "end");
textField["scrollBottom"]();

and i like to aviod it )

View 2 Replies

ActionScript 2.0 :: Calling Functions Within Mouse Event Functions?

Mar 16, 2003

Is it not possible to call other functions from generic mouse event functions? Surely it is !!??ie....

Code:
_root.myButton.onPress = function(){
hide();

[code]........

View 11 Replies

ActionScript 3.0 :: Functions Embedded Inside Other Functions?

Jan 14, 2011

Functions embedded inside other functions?  In all my years of ActionScript programming, I've never seen this (this is part of legacy code written by someone else which I am adapting):

[Code]....

View 6 Replies

Actionscript 3 :: Prototype Functions Off Custom Functions?

Mar 19, 2010

Its a complicated senario for me. I have a sound management singleton with an asset like dictionary storing all referances to my urls and assets and the guff inside it-

I have a function called addItem(id:String, url:String):Object

I would love to do something similar as soundManager.addItem(id:String, url:String).play() or soundManager.addItem(id:String, url:String).stop() of which it'll both add my item to my dictionary, and begin playing the sound

[Code]...

View 2 Replies

ActionScript 3.0 :: Passing Functions Through Functions From Different Classes?

Dec 27, 2009

Let's I have a class Square that has a several functions. I want to call it from a class Grid, which is a group of Squares.So in the class file for Grid, how would I do this:

Code:
public function doSquareFunction(thisFunction:Function):void{
square1.thisFunction();

[code]......

View 8 Replies

ActionScript 2.0 :: Functions Passed As Arguments To Other Functions?

Nov 9, 2005

I have a function with 4 necessary arguments (aka parameters) in order to perform the actions. I would like to have the ability to pass the same function to itself as an argument (sort of like a recursive function) along with its arguments. Basically I want to "base" to engage an onMotionFinished event handler if there is another function passed as an argument. Something like...

[Code].....

Would there be a way to use listeners to do this or the AsBroadcaster?

View 6 Replies

ActionScript 2.0 :: Functions And Sub-functions?

Jun 17, 2004

I have one function that puts text in a text field and makes a button goto a url onRelease.The code is like this:

Code:
item.onRelease = function() {
myButton.onRelease = function() {[code]....

the only problem is that the button doesn't work onRelease. i think that it is because there are too many functions there, but at the same time, i think it's just me..

View 5 Replies

IDE :: Looping A FLV In A SWF?

Jan 4, 2007

I have imported an FLV into my SWF. Now how do I get the video to loop?

View 5 Replies

LoadMovieNum Swf Keeps Looping

Apr 15, 2009

I'm a newbie at Flash...and have a main movie that I would like to load external movies into..for ease of modification of the different areas vice having one large swf.I'm using the loadMovieNum command to load the external swf's just fine. When I play the external swf's by themselves...they play once and stop. When they are loaded into the main movie...they loop.I've placed a "stop();" command at both the frame in the main movie...and also on the line directly after the loadMovideNum line.

View 3 Replies

AS2 Looping Through To See What MC Clicked?

Oct 19, 2009

I have many movieclips on stage, let's say 100.Rather than setting onRelease or OnPress function for each one, is there any way of looping through all the movie clips (maybe if they were called MC1 MC2 MC3 MC4 etc etc), using an array, to see which one was pressed and then say what should happen if so and so MC was pressed.

Depending on which MC is pressed a variable will be a different number... e.g. MC1 pressed means variableA = 1, MC1 pressed means variableA = 2, MC1 pressed means variableA = 3 etc

I just thought there would be a more intelligent solution than writing out this 100's of times: MC[numberOfMC].onPress = function() { do something };

View 5 Replies

Get Rid Of That Preloader Looping?

Oct 26, 2009

I made a basic slideshow it's not interactive it just loops, each time it loops the preloader loops with it so you see it each time. How would I get rid of that preloader looping?

View 1 Replies

Audio Keeps Looping Before The End?

Dec 4, 2009

I am adding an 6 minute audio to a flash website and want it to loop. It is a 6,000 kb size file .mp3 audio stream and audio event are set the same at, bit rate of 16kbps mono and a 60 second play time, however it loops after abt 17 seconds. I have set the sync to stream and loop. Code is simply Play(); The timeline is set to 405 frames at 24 fps. I have tested the original and it is fine and plays well when not in flash.

View 11 Replies

ActionScript 2.0 :: Looping Four Flv In CS3?

Oct 30, 2009

I have four flv videos (video1.flv, video2.flv,video3.flv and video4.flv) and I want to play them one after the other.When video4.flv is finished I need the movie to start playing video1.flv again and the rest after it, an endless loop.I'm using CS3 ,AS2 and Flash Player 9

View 0 Replies

ActionScript 2.0 :: Looping A Mc Using Ac?

May 27, 2005

I've mc contain some animation which is all workin via actionscript. What I want to do is once the animation is complete.......i want a delay of about 10 secs & then I want it to start all over again, so its just a looping animation.

View 9 Replies

IDE :: Looping External Swf Which Has No .fla

May 20, 2009

I have a sliding menu with buttons - each button calls an external swf - which plays in an empty movie clip.Now, I want the current loaded swf to loop till the time the user clicks on another button. The problem is, I do not have the fla files for any of the external swfs (these are screencam recordings using a software that does not publish .fla) - so I can't put a code at the end of each external swf asking it to not stop.

View 5 Replies

ActionScript 3.0 :: My MC Not Looping

Feb 10, 2010

I am fairly new to AC and have some questions about a project. I am creating a gallery with images tweening from one to the other. I have the animation working but it will not loop as expected.

1) The images are loaded dynamically via the below code.

2) The main stage uses stop(); and all mc's except the gallery mc will loop as expected.[code]...

View 1 Replies

ActionScript 2.0 :: TweenMax Not Looping?

Mar 5, 2008

I have (what should be) a really simple little piece of code inside a moviclip, trying to get it to fade in and out in a loop. Here's the code (within the movieclip):

Code:
import gs.TweenMax;
this._alpha = 100;

[code]....

View 3 Replies

ActionScript 2.0 :: Looping The External .flv?

Feb 19, 2009

How do I tell my extrnal .flv, which I am calling with the FLVplayback component, to go back to the beginning and play again when it gets to the end?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved