How do you write this code so it works and doesn't run the funtion? I want to associate the function with the button so I can load it dynamically with event.currentTarget. Played with storing the funtion in a another variable but wasn't sure how to do that either
It seems that with as3, the error compiler is just waiting to get you.I have a function that loads in an external swf. Which swf depends on which button they click. So, it could be pic1.swf, pic2.swf, pic3.swf, etc.
function loadMovie(){ my_mc.addChild(my_Loader); addChild(my_mc);[code].........
When i test, I get "error: access to undefined property myVariable.
how you would target a function's local variable through a concatenated variable string.For example:
var txt = "Hello World"; function testing(msg) { var test1 = msg;[code].........
I'd expect the trace to be "Hello World" but rather is given "undefined". So if variables created outside functions are created on the main timeline, where are local function variables created and how would you access them?
I'm trying to combine PHP/SQL and Flash. I've got a problem now. I want to load a variable that contains an url to an image. so the variable is like this: [URL] Now I want flash to load the image, not the text. The variable is called 'img1' but the loadmovie function doesn't work when I put it in.
I want to monitor a variable. Whenever the variable value changes I want to call a function. In actionscript 2 I can use "watch" but in as3 what can do ?
I have a set of Cue Points in an FLV I'm playing. It's an interactive quiz, so the idea is that flash will change a variable, theAnswer, to a different letter depending on which question it is. The answer to question 1 is B, question 2 is D, etc. Either the cue point event listener isn't working, or else it is working and Flash isn't declaring the variables. 1120: Access of undefined property theAnswer. I literally can't find a single problem with my code. I have an almost identical Event Listener further down which works.
I need to pass a variable to a function inside a function. However this parameter (i) seems not to be passed (to function ...onRollOver). This is required to attach a textfield to a movieclip (reading the adress and showing it as a tooltip).
ActionScript Code: for (i=0; i<array_BE_ElecCities.length; i++) { var attachElecCity = mc_map.mc_places.attachMovie("Plant",
I want to create a vector, then call a function that populates that vector with arrays. Fine. The only catch is the function itself will declare new array variables to put into the vector, but are these new array variables private to the function only?e.g. something like this
ActionScript Code: public var vec:Vector.<Array> = new Vector.<Array>(); private function populateVec():void {
[code]....
Is this "kosher"? a was declared in the private function but added to something outside the function..?
basically i want to populate an array with some data, photoArray[count]= varLoader.data.nombre; the problem is that "nombre" is suposed to be a variable, this is inside a loop and i have "nombre = "pic" + count;" before it, but it wont work, how am i suposed to call it?
I build an application that need httpservice feature. This application will be deployed at some computer. So, I don't have an idea to set variable at url property.
I'm wanting to set an Object property using a variable value. I just can't get it to work as it assumes the variable name is the name of the property: I've simplified the issue rather than posting my whole code.[code]It always applies 'attrName' as the property name rather than the value of 'attrName'.Tried loads of things but just can't get it to work.
im doing a loop to attribute the values to _x property, and use it to make random movimets with movieclips.i ve got 16 movieclips in my stage, named b1, b2, b3....b16 and the code is
Code: count = 0 chama = setInterval(function () { count++[code]....
so... after 3 time that setinterval execute this function, i�d like to call a function to get this movieclips, in their current positions and take them in especifics positions on stage.so I created an Array and I�m trying to use this code to define variables with values from the Array, and make a moviment to the especifics positions
Code: xC = [63.9, 16.95, 45.85, 65.55, 18.75, 26.2, 55.85, 55.25, 28.85, 21.95, 36.6, 35.75, 14.7, 45.7, 14.45, 60.75] function cPos () { for (a=1; a<=16; a++) {[code]...but it�s not working...why??what can I do to Take the variables inside the array and use them to respectives movieclips b1, b2....b16?
Assign an event listener to a protected timer variable in the parent class.
I am working with Adobe LCCS, and created a BatonProperty which implements Baton
Now, Baton has a protected timer variable declared like this, and for some reason, I am unable to get access to this _autoPutDownTimer, from a BatonProperty instance.[code]...
I'm using flash cs5.5 and i got the fallowing error:Left side of assignment operator must be variable or property_loc2.__set__counter(++_loc2.__get__counter());This is the line witch don't work.But to be sure you understand,i will add the whole script,is for a game, this error causes the text ballon don't work.
class com.clubpenguin.ui.balloons.BalloonManager extends MovieClip { var _shell, _engine, _interface, attachMovie, onEnterFrame;
I have spark States declared in mxml. I also have a class with string constants. I want my states names to match the string constants. Is it possible to do that directly in mxml and how? [code]...
i'm creating a completely dynamic form. i want to assign a variable name to a textfield and then pass that variable with a LoadVars() object.
here's a small piece of code i can't get working:
//create movieclip (used like a form) _root.createEmptyMovieClip( 'dialog_body', 0 ); //create textfield input
[Code].....
bottomline: if i create a textfield using the traditional method and assign the 'var' it works fine. if i create a textfield dynamically at run time, and use the *.variable property, the variable is NOT sent..