Profiling a flash app in an html page
I have a开发者_开发百科 flash application, that uses functionality in its surrounding html page. I want to do some profiling with the Flex Profiler (or some similar tool, if you know a better one).
But i cannot get it to work, if my flash app is run from within the html page. It only works, if i run the flash app alone, but that doesn't help me, because i need the full scenario.
Any ideas on how to get this to work?
Thank you!
i found the solution myself :o)
If you do profiling in Flex Builder, essentially flex builder loads a ProfilerAgent.swf as a preload swf. this does not work however, when you start an html page, because then the html page initiates the swf and the ProfilerAgent.swf is not loaded.
What you can do though is, you load the ProfilerAgent.swf in your app by yourself. Simply load it with the Loader (loading it in the main application domain) and addChild() it to your main stage. With doing so, profiling works even within an html page.
精彩评论