View Full Version : trace funtction
ultraloveninja
March 21st, 2005, 12:15 PM
how does a trace function work, and how would i set one up???
mpelland
March 21st, 2005, 12:18 PM
trace sends whatever text you specify to the output window.
"expression An expression to evaluate. When a SWF file is opened in the Flash authoring tool (using the Test Movie command), the value of the expression parameter is displayed in the Output panel. "
if you want to use it you can try with
trace ("Hello World");
or x = "Hello World";
trace (x);
ultraloveninja
March 21st, 2005, 12:32 PM
so, if i wanted to trace a path of some actionscript, i woul put the trace function like this:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie trace = "cramer2";
pcontainer.loadMovie("cramer2.swf");
} else if (_root.currMovie != "cramer2") {
if (pcontainer._currentframe >= pcontainer.midframe) {
_root.currMovie = "cramer2";
pcontainer.play();
}
}
}
is that right, or do i need to do soemthing else with it??
mpelland
March 21st, 2005, 12:37 PM
trace is a function not a property and therefore can be used and not set.
if you wanted to output cramer2 you would say trace("cramer2");
ultraloveninja
March 21st, 2005, 12:42 PM
ah ha!...
okay kewl.
i'll give that a shot, and hopefully that will shed some light in the issue that i am having.
ultraloveninja
March 21st, 2005, 12:49 PM
okay, well that didn't work out the way that i wanted to.
i understand it, but not what i was looking for.
scotty
March 21st, 2005, 01:08 PM
on (release) {
trace(pcontainer);
if (_root.currMovie == undefined) {
_root.currMovie = "cramer2";
pcontainer.loadMovie("cramer2.swf");
} else if (_root.currMovie != "cramer2") {
if (pcontainer._currentframe>=pcontainer.midframe) {
_root.currMovie = "cramer2";
pcontainer.play();
}
}
}
scotty(-:
ultraloveninja
March 21st, 2005, 01:21 PM
okay, i'll give that a shot.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.