views:

82

answers:

2

Hi, is it possible to display the output window's contents into a textField so it can be seen in the SWF?

Has anyone tried this?

+1  A: 

You'll need to implement a custom solution, basically every time you would call trace(), call a custom method that also put's it into your text field. If the implementation was static, it would be globally accessible.

There will be many implementations on the web that will get you most of the way there, just Google "Logging" "Logger" or something along those lines. I've got one on my site even. http://tyleregeto.com/code/logger/

Tyler Egeto
Ah ok thanks! I'll check it out and see how far I get with it, I'm glad that there is a solution after all :)
Leon
+1  A: 

There are a number of ways to do this. One method would be to use the logger Tyler mentioned. I am a big fan of XRay. It is easy to set up / use and is very, very powerful. Not only to get output, but also for realtime flash manipulation.

Define a singleton class called Logger.

sberry2A
Xray is pretty sweet!
Tyler Egeto
Thanks for the link! So with XRay does the output get displayed in it's own interface? Or could it be sent to a textField in the SWF also?
Leon
Someone can correct me if I'm wrong, but I think it's completely external.
Tyler Egeto
That is correct. Completely external. A lot more flexible that way. You don't even need to download a viewer, they have a flex version up at http://www.rockonflash.com/xray/flex/Xray.html.
sberry2A