I am trying to use the Flex Profiler to figure out where to put my time when optimizing the code of a .swf file generated in Flash CS4. In Flex, I select "Profile External Application" for the "Profile" menu item. Then I select "Launch the application manually from Ooutside Flex Builder" and set the timeout to 60000 milliseconds. I then go over to Flash CS4 and start a debug session of the application I want to profile. This should make the profiler pick up the session and give me the stats I need. But I get a couple of weird errors in the Flex Builder.
The first error is a message box the pops up and says: "Profiling can only be performed on the debug version of an application." I am definitely running the Flash application in debug mode... The only thing that I can think may be a problem is that I am using the Flash Facebook API and linking to the external .swc file for that API. Could that cause a problem?
The second error is an exception that gets thrown in Flex Builder and is displayed in the Console. The exception is this:
flash.swf.SwfFormatException: unrecognized fill style type: 202
at java.lang.Thread.run(Unknown Source)
It looks like it has something to do with a fill style, but I am just doing standard Flash stuff... No version of Flash Player has had any problems with the .swf file, but somehow the profiler is not liking something.
Does anyone have any idea about what is going on here? Apparently the profiler is a great tool to use to optimize ones code, and I would really love to use it.
I would not start a debug session in CS4. I would just find the SWF generated by the last debug session and launch the standalone player with that SWF. There might be some contention in having both CS4 and the FB profiler trying to hook up to the same SWF.
Flex SDK Developer
Adobe Systems Inc.