[okay… not really – the new compiler is just really picky]
This is another rant – but like most of my rants… there is useful information to be had! This one came about as I needed to employ some UI assets created in Flash Professional and published as a SWC for use in an AS3 project in Flash Builder. I haven’t re-published the SWC for weeks… yet when I compiled my project in Flash Builder, I received a SWF that was just borked out of any human understanding. In fact, it looks exactly like this:
Understand, it isn’t supposed to look like the UI mess you see above. So what is the deal? No errors are thrown. Does Flash Builder simply hate SWC files now? Nah. There is something that needs to be done though… for whatever reason… Adobe has, by default, removed a good amount of control as to how AS3 projects are compiled – yet there is a solution!
We must locate the project .actionScriptProperties file [found in the project root – outside of Flash Builder itself] to perform some manual edits. Open this file up in Notepad or whatever and locate the flag useFlashSDK which, by default, is set to true. This is what instructs Flash Builder 4.7 as to which SDK should be used when compiling projects; the embedded AIR 3.4 SDK and the new compiler… or an SDK of your choosing with choice of either the new compiler or legacy compiler.
When set to useFlashSDK=”true” – your project properties panel will appear as such. Not a lot of choice here…This is the default and forces the new compiler for AS3 projects. It also will publish with a Flash Player target of 11.4. This is problematic for many situations – especially when we need to target an older version of the Flash Player (which we often do). This setting also totally borked all of my SWC content – which is what led to all of this in the first place.
Setting the useFlashSDK=”false” and then accessing the project properties panel will result in a more familiar scenario. Select your managed SDK and elect to use the legacy compiler, if desired. I’m targeting Flash Player 10.2 because we need to support Macs with old PowerPC processors. Sad, right? No way around it.
You’ll want to be sure and restart Flash Builder after adjusting the .actionScriptProperties file for any new settings to take effect. Voila!