ActionScript 2.0 :: Trace Name Of A Variable?
Oct 22, 2010
Lets say I have variable x = 5.
How can I use trace to trace "x" by feeding it the variable x, as in not the value 5 but the variable name?Since I need to know what variables were passed in my functions for debugging.
View 7 Replies
Similar Posts:
Dec 21, 2004
take a look at the results of these traces:
trace(imgGal); //traces "1"
trace(itemClip1._y); //traces "32"
trace(itemClip[imgGal]._y); //traces "undefined"
why does the last trace not trace "32" like the second trace? I want to insert the variable "imgGal" onto the end of the mc "itemClip", how can I do this?
[Code]...
View 11 Replies
Jan 13, 2004
we have this variable from the internet, val(0), in a dynamic text field we can see a digit from this variable. but when we use this variable in actionscript and test it with trace, the variable shows as undefined.how can we make this work without it coming up as undefined??
View 12 Replies
Apr 26, 2004
i have the movie clip name in a string;for example var="mc1";how can i trace the value _x of the mc1 using the var variable?i need to use this on a with(var) action.
View 5 Replies
Apr 26, 2004
i have the movie clip name in a string;for example var="mc1"; how can i trace the value _x of the mc1 using the var variable?
View 5 Replies
Mar 20, 2006
a) thumbURL is a variable loaded from an XML file. The value is being passed correctly into Flash, as I have traced it and it outputs fine. thumbLoc is a number which increases through a for loop. So thumb0, thumb1, thumb2 etc. are the movie clips I want to load thumbURL into. The thumbURL I'm trying to load is in the format [URL] I have the following code:
[CODE]...
View 1 Replies
Jun 7, 2010
I'm having a lot of trouble creating a manual variable trace for the following code.
[Code]...
View 1 Replies
Feb 12, 2008
i need to know the type of variable in the output with the trace(), so it could be something like so
[AS]var outputVar:String = new String();
outputVar = "this is a string";
trace (outputVar == String);[/AS]
well, i thought this was possible, but something must be wrong...
View 7 Replies
Jan 8, 2009
I'm just getting into this and can't seem to make the simplest thing work! I'm trying to learn to define and call functions. I get no errors but it won't trace the variable:
[Code]...
View 3 Replies
Dec 21, 2009
on my stage i have 24 instance MC Page created at runtime (when cliked the button execute 24 instance MC Page from the library). Each of those MC Page create an xml with infos (not important), this variable_XML created is nested inside each MC Page.. From my stage i want to call each XML from each MC Page for make 1 unic big xml, then send it to the server.
So from the main stage i created a button that call each xml of each MC Page (there is a definit number of Page only 24, no more, no less). So when the 24 instances of the MC Page are created I push there instance name inside an Array "Page_Array". Now in my function exportxml i use get ChildByName(Page_array[number]) for find them then i can apply my method to the according MCPage.. Until here no problem, trace(dispObject.name) work. but when i try to get my variable inside the MC Page : trace(dispObject.my_variableXML), it doesnt work..
here is my function (only 1 page for this example ):
function exportxml(evt:MouseEvent):void { dispObject=getChildByName(Page_Array[0]); trace(dispObject.name); //trace Page1 trace(dispObject.my_variableXML);// here it dont trace the variableXML
}
normally if i trace(Page1.my_variableXML); , it should trace "my_varableXML" no ??
View 2 Replies
May 29, 2009
I am having issues with a global array. I have an actionscript file called MyGlobal.as at the same level as my main FLA:
[Code]....
I am able to trace that first element while trace is called within the function... but if I try to trace that first element outside of the function it is "undefined". Do I need to return the array at the end of the function? I tried that but I cant seem to get it working correctly.
View 4 Replies
Nov 9, 2011
I've been playing with prototype a bit and I've noticed that either it isn't as static as it should be or that some functions are protected from altering, or that in some cases the prototype actually extends a function. For example, I was trying to modifiy the global trace function to output the current time of a trace action, something like this :
Code:trace("lulu"); // output 12:48:17.286 lulu I DID achieve something close to it, but it seems that I haven't actually modified the global trace function, but rather it's "_root" counterpart,
[Code]...
View 3 Replies
Nov 14, 2009
ive got a loaded xml list for an mp3 player. from playing track1, when i select track 2, it traces "track1" but then after a second click it traces "track2" and stays on that. the actually music for track2 does load on the first click though, but not the trace. anyone know why on the first click it would still trace the previous track? here is the code for that function...
[Code]...
View 9 Replies
Aug 8, 2006
var dane:Array = new Array();
dane_xml = new XML();
dane_xml.ignoreWhite = true;[code]....
and this last trace gives me undefined while trace(temp) gives me what I want
View 7 Replies
Jul 22, 2005
I'm teaching myself ActionScript and the book I'm reading just got into input text capabilities. The book shows me how to link input text to a variable and output that text to the output window using trace. My question is: how can I display the text that the user input onto the actual movie. For example... if I wanted the visitor to type their name into the input text box and click Submit and then a phrase shows up with their name such as "Hold on Name, my site will be done soon." How do I reference that variable and have it actually display in my movie?
View 5 Replies
Aug 16, 2011
I think it would be simplest to explain it like this:
[Code]...
View 1 Replies
Jan 3, 2006
f you know PHP...then you know that you can create a string variable...and then use the value of that variable to declare another variable. like this:
PHP Code:
<?php$foo = "haha";$i{$foo} = "success";print $i{haha};?>
and it would display "success"...or like this:
PHP Code:
<?php$foo = "haha";$$foo = "success";print $haha;?>
and it would also display "success".
View 6 Replies
May 15, 2011
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
View 5 Replies
Dec 21, 2010
i'm preparing to do a tile based game, but i'm going to probably have access to at least maybe 20 tiles so i wish to do my tile map like this
var myArray:Array = [[001,001,001,001],
[001,000,002,001],
[001,015,000,001]];
that's a rough example. but to develop a map editor i need to be able to string a number will 0s preceding anything that is less than 100. is there an API for this or would i have to go with something like
if (a < 10) {
string = "00"+a;
} else if (a < 100) {
string = "0"+a;
}
View 2 Replies
Nov 25, 2009
I have define complete event handler and want to return value . But I lose "myString". I do not know how to return "myString" from loadXMLFile.[code]...
View 1 Replies
Feb 20, 2009
I wanted to ask that what is the method to trace the attribute in the xml file. I am trying a code but its saying undifined. The xml file looks like
[Code]...
View 2 Replies
May 7, 2009
This successfully traces that the cue point has occurred
how do I add tracing the name of the cue point?[code]...
View 2 Replies
Dec 2, 2010
I have a movieclip on stage.I load external image in it.Now on mouseclick over it I want to trace the image name eg "Andrew.jpg"How can I do this.
View 8 Replies
Jun 29, 2010
I just bought CS5 like a week ago. I'm finally getting around to using it for older content and now my trace output doesn't work for anything. The output window opens up, but nothing prints out. I'm also getting TweenMax errors in something I haven't touched in weeks.
View 7 Replies
Aug 24, 2011
Im using hitTestObect to detect collision.
if (movieclip1.hitTestObject(movieclip2) {
// do something
}
the above code detects whether movieclip1 hits movieclip2.... ok
if (hitTestObject(movieclip2) {
// do something
}
the above code detects whether 'Anything' has hit movieclip2.... ok
what i want is a way to use the second code but for example, trace the movieclip's name that hit movieclip2
there are above 50 possible movieclips that could have hit movieclip2
the only way i've thought of doing it is doing a loop using the first method (replace movieclip1 with movieclipArray[x])
but rather than doing a loop i would just like for it to trace the name of whatever hit movieclip2
View 5 Replies
Sep 17, 2011
I'm new to flash but I have over 15 years in software and 20 in IT.In everything I have worked with so far in Flash I've used trace( message ) to put a message in the output window. Then it just stopped.
View 4 Replies
May 21, 2010
I chose new actionscript file(3.0) and wrote as simple as trace("Hello World");, but it is not working. I have flash player 10 and i also made sure i have not checked omit trace statements in publish settings.
View 1 Replies
Jan 27, 2011
I wonder if there is a function in ActionScript that can let me trace a bitmap file on the fly though scripting: something like myimg.TraceBitmap(), instead of having me to open a *.fla and work it there.
View 2 Replies
Sep 20, 2011
I am trying to trace some XML Data. I used a URLLoader and once load is complete, I try to trace back the XML Data. I can trace the entire file
trace(xmlData);
but if I try to trace a specific node, I get nothing in my trace
trace(xmlData.captions);
What could I be doing wrong? All tutorials I've seen make this seem so straight forward, but it's just not working for me?
//////EDIT////here is the question clarified.
protected var xmlLoader:URLLoader = new URLLoader();
public var xmlData:XML = new XML();
public function loadXML(_filename:String) {
[code]....
View 2 Replies
Jan 24, 2009
What is the equivalent of the following program in AS 2.0?
In other words, how can I trace segments = a line between 2 points defined with their coordinates (x1,y1) and (x2,y2) ?[code]...
View 2 Replies