Flash Builder 4.7 – useFlashSDK

Flash Builder 4.7 Hates SWC[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:

borkedswc

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…useFlashSDKThis 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.DONTuseFlashSDK

You’ll want to be sure and restart Flash Builder after adjusting the .actionScriptProperties file for any new settings to take effect. Voila!

workingswcMuch better!

Tagged with:
Posted in Rant
10 comments on “Flash Builder 4.7 – useFlashSDK
  1. Kilian says:

    Thanks a lot for this hint. It was driving me nuts, that the swc´s weren´t displayed correctly. Not to mention all the strange errors you encounter when switching to the new compiler (inavlid overwrite error, name-scope-problems (Starling for instance), method cannot be used as constructor, eg.).
    I am pretty disappointed from adobe to release a version that is not capable of compiling older projects. Spend almost 2 days on error finding and trying to understand what happens wrong.
    Since I only needed FB 4.7 to enable the advanced telemetry option – this workaround does it for my case and I can (luckily) stay with FB 4.6.

  2. Bruce says:

    it’s ‘voilà’ not ‘viola’
    just saying…

  3. Pete says:

    Hi Joseph,

    Thanks for reporting this issue. We recently resolved a similar issue for another FB 4.7 project that was being compiled using ASC 2.0. If you still have the above example project source available I’d like to confirm that this fix addresses the issues you experienced above?

    Pete

  4. Jacques says:

    Thanks for the post. This became a big headache for my older projects that I needed to edit, but couldn’t because the UI in my SWCs were all messed up when I’d compile with the new FB 4.7. It was driving me crazy that I couldn’t figure out how to switch the SDK back to the one the project was supposed to be using.

    Before I found your post, I had to re-install FB 4.6 (I uninstalled it when I got FB 4.7)…and it was NOT easy finding a FB 4.6 installer from Adobe’s site. Hopefully now I can do it all in FB 4.7 with your workaround.

    Thanks again,
    Jacques

  5. Li says:

    Man, I had been struggling with this for ages. It seems to fix the dreaded error -> VerifyError: Error #1014: Class mx.core::ByteArrayAsset could not be found.

    You got me all emotional… God damn Adobe!

  6. chris says:

    Thanks, I was having issues with my older swcs in FB4.7 as well. I also discovered another weird bug. I created a beveled rectangle in Fireworks CS5, imported it into Flash CS5 and added a layer with a dynamic text field on top. I published it as a swc and added it to my FB4.7 project. Upon publish, the text rendered fine, but the beveled rectangle didn’t render. I recreated the rectangle in Fireworks as a rounded rect this time, reimport to flash and publish as swc, then added it to FB4.7 and it works (the rounded rect renders). Why does a rounded rect render and a simple rect does not? Think it might be related to this issue? Thx.

    • I’m going to say it is probably related. So many aspects of the images and such within my SWC were “modified” by this. So strange. Adobe does have the files I was using though and my understanding is that they are getting closer to a solution (if they haven’t done so already).

  7. Marc says:

    Any news about this bug fix from Adobe?

1 Pings/Trackbacks for "Flash Builder 4.7 – useFlashSDK"

About the Author


Joseph Labrecque is primarily employed by the University of Denver as a senior interactive software engineer specializing in the creation of expressive desktop, web, and mobile solutions. He is also the proprietor of Fractured Vision Media, LLC. Joseph is an Adobe Education Leader and Adobe Community Professional.

Joseph Labrecque : Adobe Education Leader

Joseph Labrecque : Adobe Community Professional



View Joseph Labrecque's profile on LinkedIn

Building a Mobile App with Feathers and Starling

Building a Mobile App with Feathers and Starling

Latest Book

Learning Adobe Edge Animate

Latest DVD

lynda.com online training tutorials