It is possible to see your ActionScript trace statements when you run your swf in a browser. Definitely nothing new, but something that I come back to seldom enough that I need a reminder of the necessary steps. That’s the purpose of this: a quick list in note-to-self form, just so that all the steps and links are condensed in one place.
The main ingredients: Flash debug player, a flashlog.txt file, and Terminal (to see live changes). For the record, I’m on a Mac with OS X, no help for Windows here.
The basic steps:
- 1. Uninstall player (if necessary) and install debug player
- 2. Make sure you have flashlog.txt in /Users/your_user_name/Library/Preferences/Macromedia/Flash\ Player/Logs/
- 3. Open Terminal in that Logs location, do tail -f flashlog.txt
That’s it. Watch your trace messages – or more fun, anyone else’s you surf upon – appear in the Terminal window.
For the first step… Both the player uninstaller and the debug installer are on this page http://www.adobe.com/support/flashplayer/downloads.html. A really helpful page to check whether installing the debug version actually worked is here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507. Special bonus: it tells you explicitly whether you have the debug version or not. (Page seems broken now, hopefully that’s not permanent.)
The second step is about the file that the trace statements get written to. If you don’t have one there, just save a text file there with that name.
And finally, the third step lets you watch the changes live. Otherwise I found I needed to close and re-open the file to see new traces. So you’re actually using Terminal to watch what happens to the log file.
http://www.digitalflipbook.com/archives/2005/07/trace_from_the.php (more details there if you want em)