ActionScript 2.0 :: Trigger Two Functions At The Same Time?

Jul 21, 2008

i am trying this withou succes

Code:
curr_item.onRelease = DelegateFD.create(this, generateSubMenu, curr_menu, "submenu_mc", curr_item._x, 225, 1000, curr_item.node_xml);
curr_item.onRelease = DelegateFD.create(this, releaseMenu, curr_item, curr_item.gotoURL, curr_item.pageTitle);

But only the last function releaseMenu is being executed

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Trigger Functions According To A Set Condition?

Nov 20, 2004

Apologies if this has been posted b4, but I cannot find anything in the search...

I want to trigger functions according to a set condition... what I am trying to say is.....

if ( the value is more than 6 but less than 18) {
do this()// everything between and including 6 and 18 , i want to trigger 1 function......

} else {
do this()
//everything else 1,2,3,4,5,19,20,21 etc I would like to trigger another function
}

View 2 Replies

ActionScript 2.0 :: Performing Multiple Functions With Just One Trigger

Jan 18, 2004

Sorry if the subject doesn't make much sense but I basically want to perform several if the statement when on movie clip is clicked. an example of an onRelease trigger that activates two if then statement that change the frames of 2 movie clips.

View 11 Replies

ActionScript 2.0 :: Performing Multiple Functions With Just One Trigger?

Jan 18, 2004

I basically want to perform several if the statement when on movie clip is clicked.

an onRelease trigger that activates two if then statement that change the frames of 2 movie clips.

View 11 Replies

ActionScript 3.0 :: Doesn't Trigger The ImgDisplay Or ImgLoading Functions

Oct 10, 2009

[Code]....

When I run the above, it doesn't seem to trigger the imgDisplay or imgLoading functions(imgLoading was supposed to be progress event, but I changed it for testing).....it seems, the eventListeners are not working

View 4 Replies

ActionScript 3.0 :: Can't Trigger Functions That Are Mapped On Keyboard Events

Sep 24, 2009

I build a game that is working great on its own.Using keyboard events enter frame.When i load it in another movie, i cant trigger functions that are mapped on keyboard events.The listener is executed, but doesnt listen.On its own fine, loaded into another movie: no keyb events and from time to time enter frame event errors.I can access the keybard functions AFTER clickin on the movieclip that contains my loaded swf.

View 3 Replies

ActionScript 3.0 :: Keyboard And Mouse Input Does Not Trigger The Appropriate Functions?

May 25, 2011

After about a week of arduous debugging and restructuring I've finally got my game engine to compile and run without any errors or wierd output. However, my control code, which I've moved almost untouched into it's own class, is failing to function due to events not triggering. It can be found at the bottom of this post, but I had to delete the contents of a few functions to make it fit in the char limit. The functions that are empty, aren't like that in the actual code, they didn't seem relevant to the problem.The important part to note in it is my block of addEventListener lines, flanked on either side by a trace message. Both of those traces fire successfully, so that would seem to indicate that the event listeners are being added fine.

The problem is that no events fire. At all. None of them. Keyboard and mouse input does not trigger the appropriate functions, I've tried traces just inside each of them, and they are never triggered.ctually, one event does fire correctly. The one that runs every frame. That goes perfectly, but the others do not.Is there any obvious flaw in my code that could cause it? Other than this, the entire application runs perfectly, without a single compile error and nothing in the output box except my traces.

Code:
package {
import flash.events.*;

[code].....

View 2 Replies

ActionScript 2.0 :: Trigger An Action With Different Time Duration?

Mar 17, 2005

i know what is wrong with this function? This is a function which I use to trigger an action with different time duration. When I call this function it just wont work.

[Code]...

View 2 Replies

ActionScript 2.0 :: Flash 8 - Trigger Time Up Without User Interaction?

Aug 10, 2009

I would like to start a timer on a button release which will trigger a "time up" on the user when a reasonable time to respond has been reached. I think I know how to use getTime to set a starttime variable but how do I trigger the "time up" without any user interaction?

This is the code I have:
var starttime=getTimer() // put this where you want to start tracking time
var elapsedTime=getTimer()-starttime; // put this where you want to know the time.
while (elapsedTime>4000)

View 1 Replies

ActionScript 3.0 :: Trigger A Button's Over State Without The Mouse For A Specified Time?

Oct 12, 2010

I am trying to figure out how to trigger a button's over state (i.e. play the over state movie clip for about 4 seconds and then return to the up state) without the mouse event.

The playing of the movie clip would occur when an Action Script cue point in an flv was reached. I think I have the right code for the cue point handling, but have no idea how to specify the over state of a button, or how to tell it to play for a specified time and then return to it's up state.[code]...

View 2 Replies

ActionScript 3.0 :: Getting FLV Control Time To Trigger Slide Image?

May 25, 2010

I need to get the time in the flvcontrol to trigger a slide image. Where I can find the reference for that control or offer up any code?

View 1 Replies

ActionScript 3.0 :: Current Time Event Trigger - Video Playback Component

Aug 27, 2010

I'm attempting to use Flash for displaying "scrolls" on our educational access channel. I have an announcement on each frame, which has a 7 sec delay, and a footer that displays the current time. What I would like to do, using the vars the Hours and the Minutes trigger a command that at a set time, like 8:20, it would jump to another swf file that might contain a video playback component. I can't seem to come up with the right combination to trigger it a set time. Here is what the frame 1 AS contains.

ActionScript Code:
stop();
var wT:uint = 1000; //wT = waitingTime
var ttL:uint = 1; //ttL = times to loop
function customTimer (timeToWait:int = 1):void {
[Code] .....

View 3 Replies

ActionScript 3.0 :: Getting Run Time Of Functions And Flash CS5?

Aug 27, 2011

Is there a way to compare running time of functions to find out which one runs faster? In Flex Builder, there's the flex builder profile that monitor performance and speed of functions. Besides using AS3, is there a similar tool in Flash Pro CS5 (or if there has always been one in lower versions)?

View 5 Replies

ActionScript 3.0 :: Functions Only Work Half The Time?

Jul 24, 2009

Without getting in to the specifics, I have a .fla file that has several functions that animate movieClips already present on the stage.

When I compile/view the SWF while working on it, the functions only "run" half the time. The other half of the time, Flash never runs the functions, it just pretends the call never happened. Sometimes they work, and sometimes they don't. I have a feeling it may have to do with Flash's garbage collection, but I don't know how that works.

View 4 Replies

ActionScript 2.0 :: Call Multiple Functions At One Time?

Oct 13, 2009

I was thinking can you call multiple functions at one time Like instead of

[Code]....

View 3 Replies

ActionScript 2.0 :: Save Time And Space With Functions?

Jan 12, 2011

I was wondering if there is something that I can write (a function? I don't know what they are or how they work ) so that I don't have to rewrite code. [code]...

View 1 Replies

Call Functions On The Main Timeline, From A Different Time Line?

Jul 14, 2009

so here's the function on main stage:

function slideImage(btnNum:Number)
{
trace("scrolling image");
trace(btnNum);

[Code].....

How can i acess slideImage function on the main stage. in AS2 _root.slideImage(btnNumber); would work. How Would I do this in AS3?

View 3 Replies

ActionScript 3.0 :: Two Functions Running At Same Time With Single Button Press

Jan 23, 2012

I have a problem with two functions. This is the story: the user has to press the space button on keyboard when he sees something on screen, then the "rightClick" function is called. If he presses the button when there is something else on screen that is a wrong answer (function "wrongClick" is called). The problem is that when the user presses the space button both function run at the same time.

This is the call of the wrongtClick function on frame 5
stage.addEventListener(KeyboardEvent.KEY_DOWN, wrongPress);
This is the call of the rightClick function on frame 10
stage.addEventListener(KeyboardEvent.KEY_DOWN, rightPress);

Both function are very simple:
function rightPress(event:KeyboardEvent):void {
scorenum += 1;
trace ("Right:",scorenum);
} function wrongPress(event:KeyboardEvent):void {
wrongnum += 1;
trace ("Wrong:", wrongnum);
//and plays a sound too
}

View 3 Replies

ActionScript 2.0 :: MX: Trigger A MC Then Wait Then Trigger Another?

Aug 23, 2005

I have an application done in flash- on the main Scene Level, everything has only one frame but I have MCs and the like that are triggered by actionscript.There are quite a few nested functions on the main actions layer as well as an "onEnterFrame" function that reloads XML data in the background, etc... but that is not the problem.

The problem is, that at one point, I am calling a few MCs that kind of close up a section of the page like blinds- and then I want a text to appear ontop of that now closed area... but if I just write...

Code:
_root.TimelineFader.BlendeT1.gotoAndPlay(2);
_root.TimelineFader.BlendeT2.gotoAndPlay(2);
_root.TextAboveTimeline.theMessage_txt._visible = true;

...it all happens simultaneously, of course.I guess I could check for "BlendeT1"'s (or T2's) current frame (since it's an MC)... but how do I wait while that MC runs / until it reached a certain frame? How can I keep the rest of the actionscript in the main function from continuing?

View 5 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







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