Yesterday I came across interesting articles from jpauclair. The first one is about Almighty PreloadSWF (mm.cfg attribute to define preloader for any as3 .swf file) and the second about his new Flash Visual Profiler. Long story short, you can debug and profile any ActionScript 3 compiled .swf file on the web (or local) you decide to, for example in De MonsterDebugger (open source debugger for Adobe Flash, Flex and AIR).
You can read more about how it works on articles linked in article perex, I am gonna supply just the quick todo list to make this work. Here it is:
- install Debug Player (if you do not have one already)
- install De MonsterDebugger and run it
- download MicroProfiler.swf to your local drive
- make sure the download location (etc. d:/whatever/MicroProfiler.swf) is within local trusted scope
- open your mm.cfg (on win XP C:\Documents and Settings\username\mm.cfg) file and add this line
PreloadSWF=c:\whatever\MicroProfiler.swf
- close all tabs using flash player or just restart browser
Thats it, thats all. From now on, whenever you visit any site with .swf file compiled in as3, you will see a small MicroProfiler over flash movie. If De MonsterDebugger runs it receives data, it also allows you to change variable values and call functions on the fly. Just cool.