This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

Friday, September 30, 2005

Quick Tip for Flash/JavaScript Debugging

I'm doing some debugging where I script a hidden Flash file with JavaScript. A common problem in Flash development outside of the Flash IDE is how to report debug information in a real application, especially if the Flash file is hidden. Here's a little trick I use whenever I want to report some debug information; this creates a JavaScript popup box with the given message:

Inside of Flash:
getURL("javascript:alert('hello world!')");

If you want to print out some variable, you could do the following:

getURL("javascript:alert('someVariable="+someVariable+"')");

Comments:
You can also put trace functions in your ActionScript and view the debug log using the Flash Content Debugger and a log viewer like FlashTracer for Firefox or TailXP for Windows.
 
Post a Comment

Subscribe to Post Comments [Atom]



Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]