I have been firing a few onEnterFrame functions depending on the users interaction. ie. animations/loading bars etc. Now I have been trying to streamline my code practice, so it's nice and efficient, and most importantly - I get to delete those onEnterFrame functions when they are complete. The way I call my functions doesn't neccessarily delete my onEnterFrames when they have completed their task. Sometimes it does, sometimes it don't.[code]Is there a more efficient way to get this dialogue to work? As if I start using this method to call a progress bar % and it is concerned with 'loading' something, then this onEnterFrame doesn't seem to work properly. For simple animations, it's ok.
I have two functions that work individually, but not together because they're both onEnterFrame functions for the same mc (which is not possible).
Here's the code from the mc "A" class file: Code: function onEnterFrame(){ removeA(); connectT(); }
This works until the next function runs... function removeA(){ if (this._x < 500){ removeMovieClip(this); }} var strandID:Number function connectT() { [Code] .....
Explanation of code: mc "A" hits "strandT" and the two move together across the screen. Mc "A" needs to disappear when it hits x = 500.
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,
How do I make it so that when the mouse button is released it makes it so the object can't be picked up any more (basically it removes the on(press) part)?
have a node that has an asfunction embedded - won't work. if I change the a href to a web page- it works fine. If I try to call a custom function it doesn't call it at all.
we know obj2 is just a call of obj1, they are the same thing.also, prameters of function are also the calls of the object outside e.g.
var objC=new Object();objC.name = "Jhon";[code].........
it seems that when setting tar to null, the obj outside in the function didn't changeit seem taht everything you do will pass to the real object, but not setting it to null;
my questions: how to make the real object became null with a call?
Is there some way to createdelete multiple this.onEnterFrames for the same element? Like if you wanted it to expand and fade out over time simultaneously but wanted it in 2 seperate functions, and to stop at 2 seperate points.
[Code]....
Both are applied to the same element so when one triggers the delete the other is also deleted. I tried making a dummy movieclip for each function to be the onEnterFrame trigger, but then I don't get to use This and I'm not sure how to pass which pic I'm on into the onEnterFrame if I do it that way.
I'm creating one sprite named 'holder' and I'm adding childs to it. finally I use sp.source = "holder"; NOTE: scrollPane is in stage, having instance name = sp, holder is AS created.
this works very good, but I need to on button press refresh data on holder. So I want to complete remove holder, so my function can recreate it with new elements and then define scrollPane.source = "holder";
How can I do this? var holder:Sprite = new sprite(); holder.name = "holder"; addChild(holder); // this adds holder to stage // // add elements to holder
Only recently have I understood that onEnterFrame creates a continuously-running program that runs at the same framerate as the movie (until you call a "delete enterFrame). So, if I have a bunch of these running at the same time will I see a big speed drop? I'm a bit leery about using onEnterFrame because of this. Are there any alternatives to this method? I haven't been able to find any (short of putting onClipEvent handlers on movie clips).
I am trying to figure out how to call a function in one swf from another swf both of which are loaded into the same master swf.This is my function in workPhoto.swf which is loaded into level 5 of the master.swf:
Code: function killThumbs() { image_mcl.unloadClip(thumbnail_mc);
I am trying to call a C++ function from actionScript3. using Programming ActionScript 3.0 > Using the external API > Using the ExternalInterface class > Calling external code from ActionScript, I could call function from JavaScript .
it will be good if i could call C++ functions directly from Action Script.
I am using ExtrernalInterface.call(javascript_function, args); to call javascript functions from Flex. But this fails in case of browsers that have javascript disabled. Is there any other way to call javascript functions from flex?
I have written two arrays for two separate functions and trying to have a button call both. How is this done properly? The function calls, collection() and left() are conflicting.[code]...
What Im trying to do is to call a function called e.g start(); from a class that extends sound. Iwe been trying for hours now. How can I make this work?
is there a way to call on my functions for one button..for example my home btn on CLICK event does 5 different functions. Is there a way to put those functions in some sort of an array and just call on that...
I have placed a movie clip on the stage, with the variable name mcThumbnail. The following code in entered in the first frame (the only frame of the timeline..).[code]...
in my Main class, i try to call a function from another class, but when i compile i get this error:1136: Incorrect number of arguments. Expected 1.i have seen some fixes involving an event in the OtherClass and (null) when i call it, but it dosent seem tohere is a code that describes my problem, what do i have to do to make this kind of code work?m i doing it wrong, or do i have to do something else?OtherClass
Im doing something wrong.I have written two arrays for two separate functions and trying to have a button call both. How is this done properly? The function calls, collection() and left() are conflicting.Currently left() isnt working, but with collection() commented out it does.
Lately I changed Flash CS3 for CS4. In older version classes written by me worked fine. However, in CS4 I have serious problem with them. Compiler states that part of my functions and vars are undefined, which is not true. I tried everything - changing name of class, functions, moving class file to different directory, removing package. I even counted { to check if they have pairs. I'm really out of options what can cause those errors.
Here are error given by compiler:
1120: Access of undefined property mnChangeMan. 1120: Access of undefined property ChangeManSliders. 1120: Access of undefined property ChangeManInput.
I am playing with a page viewer which imports SWFs for pages from an XML file.If i make a button on one of these pages, can i get it to call the parent master SWF functions?I have tried this...
I was wondering if ActionScript had some way to call functions and classes from variables, like they do in PHP:
function funcname() { print "Potatoes come from tree"; } $function = "funcname"; print $function; // Prints out "funcname" $$function(); // Prints out "Potatoes come from tree"
In case you don't know the syntax for PHP, you should know that anything perpended with a $-symbol is a variable.