What I want to achieve is pretty basic: I have an input text with instance name (contact_date) and I want the information the user enter in this input field to be kept in a variable that I can reuse later on in my movie.
I have 26 buttons in my library named BUTNA, BUTNB, BUTNC, etc. all the way to BUTNZ.
I want the script to pick a random button from the library and place it on the stage.
I am probably doing this wrong, but I am lost.In my script, I need the variable btnp1 in place of BUTNZ in line 8.I don't know how to do this.[code]...
in as2 you used to be able to just declare a variable on a movieclip something line myMC.newvar= "something". this does not seem to work in as3 I get undefined property. Am I missing something on how to dynamically declare variables to sprites and movieclips?
I have several movieclips that I exported to actionscript from the library (c01,c02,c03,...)In the actions I have a conditional that checks a variable and depending on the variable provided I want to create a new instance of that movieclip. For example if cityY==1 then I want to create a new c01.
I tried with conditional and with a switch/case but I get an error declaring the newCity variable more than once.[code]...
What is the difference between declaring a variable like this: variable = 1; and declaring it like this: var variable:Number = 1? Why is it better to use the second way?
Im using a tween engine, and its syntax for use is as follows::
[Code].....
How can I write "_x",100,1,"easeout",0,callback as a string?? I have tried to put "these" around the text. The problem seems to be that "_x" and "easeout" which are effectively strings inside the string! -- but for the tween engine to work - I need to declare that.
I'm trying to find information in how or if it it possible to declare a Variable Type that can accomodate 1 of 2 different Types In this particular case I'd like to set a Variable able to accept either Integrals or Strings I know i Can use a wildcard as below and it works, but it also allows for any other type to be added.
private var _destination:*;
My first Thought was something like this
private var _destination:String^int; private var _destination:String|int;
I am trying to send a value from one of my xml nodes (<marker>) by declaring it in a function 'showData' as a variable 'XMLMarker'. If I trace this value (XMLmarker) it returns the right data found in the node <marker> (which is 'myMarker_mc'). However, I need to tell the stage that myMarker_mc is a MovieClip...please see the 'PROBLEM' stated in the code below.
I'm trying to build a little question/answer program in flash using XML data as the source of information.I'm trying to build it in such a way that I only have to alter the XML, not the .as files.So, for example, I have
After I run it gives me these two errors : Scene 1, Layer 'actions', Frame 1, Line 25 1084: Syntax error: expecting rightparen before colon. Scene 1, Layer 'actions', Frame 1, Line 27 1084: Syntax error: expecting rightparen before colon. Also in the output tab I get these errors : ReferenceError: Error #1065: Variable TLFTextField is not defined. ReferenceError: Error #1065: Variable TCMText is not defined. I've been trying to figure this out for about 30 minutes but wasn't able to.
all I want to do is add a variable to a getURL line of code.EG:getURL("/index.asp", "_self");I need to add a variable (_root.myvariable) to the end of the link so that it goes to:index.asp?myvar=thevalueofmyvariable
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.
When you initialize a new object, how can that class have access to a variable from the parent?In this case Blob needs to be able to access scale?[code]
i want to access variables from within movie clips, and my question is, when declaring variables from the root, is it necessary to add the _root? e.g.:
Code: var _root.imgSource:String = "img001.jpg"; or would it be sufficient to declare the variable in the root timeline, then refer to it in child clips as _root.imgSource?
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..?
on (release) { stopDrag (); if (_root.go_blue._droptarget == "/g_target")[code]...
This works. I need to add "if (test = "one")", another drop sets this variable and the drop above should test for it. But I can't get the basics right! I'm a programmer who is new to Actionscript. What I want is:
"If the variable is correct AND if it is dropped on the target (g_target) THEN play the movie, ELSE go back to _x=130, _y=300."
The variable is being assigned correctly, I tested it with a Dynamic text box. The movie isn't running with my code!
_xml.group1..image[i] _xml.group2..image[i] _xml.group3..image[i] _xml.group4..image[i] _xml.group5..image[i] Im trying to reference each object thus: _xml.group[myVariable]..image[i]
i have a variable take away another variable which makes answer1 variable i then want answer1 to be to the power of another variable how can i do this in flash
I'm using addChild(new nmonster()) to populate an on stage MC from my Library.
Instead of specifying the Symbol, I want to add it using an Array reference, like addChild(new monsterArray[0]()). I've tried a number of variations, but AS3.0 is unforgiving.
I have the following code which basically drags this circle around and if put on the right symbol "bow", then variable answer1="Correct" and this is displayed in a dynamic text field.
Now I also need to make it so if variable answer1="Correct", in other words if the circle was dragged to the right location, to go to frame 147 or just resume playing. I don't care about what happens to the dragged circle afterwards. I'm using the following code: