PDA

View Full Version : can someone explain trace()?


boyzdynasty
09-18-2002, 04:40 PM
I read the description but I'm not that clear on it.

Is it just used for debuggin' purposes?

I actually have no idea how to use it.


Any tips will help.

tg
09-18-2002, 06:33 PM
trace() is a great debugging tool in flash. it only works in the test environment (ctrl+enter).
trace(someITem); when executed will open the output window and display whatever someitem is.

so try this:

//frame1
trace(this._currentframe);
//output: 1

var myString;
trace(myString);
//ouput: undefined - because it hasn't been assigned any value yet.

var myObj=new Object();
trace(myObj);
//ouput: [object Object]

var myArray= new Array(1,2,3,4);
trace(myArray);
//output: 1,2,3,4

myString="hope this helps boyzdynasty";
trace(myString);
//output: hope this helps boyzdynasty"

trace("i'm done now");
//output: i'm done now

boyzdynasty
09-20-2002, 03:25 AM
thanx for the lesson!! :D

I feel bad... I wish I can help out other people in the forum like you and others.

I hope to get use to "ActionScript" and then.... I hope to add my 2cents to the "Forum"


o... I pass on your petiton to my frenz at school and online frenz

"hope there were an increase in signatures" :)

-Again, Thanx

It is now mux clearer