View Full Version : NEWB: How to make output a variable
roy_geoff307
10-19-2005, 11:19 AM
I want to get the output, out of it own window, and int a dynamic text bow, i thought the easiest way to do this would be to make the output text a variable..if that possible..and then get the text box to import it.
Thanks in advance,
Geoff
finchou
10-19-2005, 11:38 AM
I'm not sure I understand what you want but in each of my classes I define a function dtrace :
private function dtrace(txt){
trace("nameOfTheclass : "+txt);//normal trace
//_level0.debugTextField.text="nameOfTheclass : "+txt;//trace on the stage in a textfield
}
this way you can choose if your output goes in the trace window or in a textfield, or nowhere...
If what you want is to have the trace outside of your movie then you can use a localConnection and send the text to some other flash movie which will display it...
roy_geoff307
10-19-2005, 11:54 AM
Ill try to explain in more detail....Ive got a reaction time tester, for a school project.
Ive managed (with help) to get the result (in ms) on to the output window, using trace ("your time was" +totalTime+ "ms")
I want this in a dynamic text box on my page.
I tohught if it were possible to asign a var. to the output window i would do that.....
Thnks for the help so far...any more would be greatly appreciated.
finchou
10-19-2005, 12:01 PM
you're not alone (http://www.actionscript.org/forums/showthread.php3?t=84653&page=1)
if you want your output to go in a textfield replace
"trace("toto");"
with
_level0.yourDynamicTxtField.text="toto";
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.