FDT – switching to Flex 4 SDK

First of this tutorial targets FDT 4 only and there is no guarantee that this works properly for everybody! So better leave this alone if you are not sure what you are doing. Furthermore you’ll not be able to use Flex with this, but however it works for pure ActionScript projects!

Step 1 – Download the Flex 4 SDK & playerglobal.swc

Download the latest milestone release of the Flex 4 SDK.

Flex 4 SDK Download

Unzip it and place the sdk folder “flex_sdk_4.0.0.14159″ into your global actionscript directory any place else where it is safe. Best practice is to not rename the folder so you can keep track of what build you are using. Don’t worry, you do not need to type the name in anywhere ;)

Next you will need the playerglobal.swc with the new API stuff of Flash Player 10.1. It sits at the very bottom of the page.

Step 2 – Insert playerglobal.swc

Open up your downloaded Flex 4 SDK folder and navigate to: {SDKFolder}/frameworks/libs/player/10.0/

and replace the file inside of it with the downloaded playerglobal.swc. Now the SDK has the latest ActionScript 3 API stuff.

Step 3 – Open FDT preferences pane

Fire up FDT 4  and go to the preference pance.

(I’m using the Milestone I beta build which is the latest at the moment)

Choose “FDT > Core Lirbraries”

FDT > Core Libraries

Step 4 – Add the SDK

Press the “Add…” button on the very right. And select “Flex 3 SDK for FP 10″ and enter name like shown below:

flex 3 sdk for fp 10 and a name

Next click on “Browse…” next to the path variable field, select “New…” in the upcoming dialog, enter a name without spaces and browser to the flex 4 sdk folder on your hard drive. Then click ok. It should look something like this:

add the path variable

Click ok till you are back at the Core Libraries dialog where you have to select your freshly added SDK now.

sleect new sdk

Click ok to leave the preferences pane.

Step 5 – Modify the sdk folder

Go to {SDKFolder}/frameworks/libs/player/ and rename the folder named 10.0 to 10

Next go back to {SDKFolder}/frameworks/ and open up the flex-config.xml.

Go to line 16 and tell the SDK to target player  10.1.0

Navigate to line 52 and remove “.{targetPlayerMinorVersion}” so that the new line 52 says: (+ the xml tags)

libs/player/{targetPlayerMajorVersion}/playerglobal.swc

Do the same in line 71 which should say this after you edited it: (+ the xml tags)

libs/player/{targetPlayerMajorVersion}

Last but not least goto line 385 and switch the property “static-link-runtime-shared-libraries” to true, it is set to false by default.

Done & conclusion

You are now able to compile pure ActionScript projects with FDT 4 and the Flex 4 SDK. This doesn’t seem to work with Flex however.

I think once I hit the publish button on this a lot of people will tell me that this is sh*t, but it works fine for me. If you have any additions, thoughts or comments on this, feel free to use the comment form below.

This is gonna be fun ;)

Edit

I updated my post according to the things that John Barret (@hfug) found out – thanks for research John!

21 Responses to “FDT – switching to Flex 4 SDK”

  1. Awesome!!!!!!!!!!!!!!!!!!!!!

    It works :) i have many errors at editor but it works i can compile!!!!!

    But debugging with breakpoints doesnt work :( but okay hey i can compile ;)

    Very good job dude…

  2. flexflip says:

    Although your solution seems to fix one problem, I’d prefer to see Powerflasher resolve it without having to change the flex-config. An issue has already been raised and everybody reading this might want to vote for it: http://bugs.powerflasher.com/jira/browse/FDT-880

    • Aiden Tailor says:

      Of course this is just a temporary solution and I am looking forward to the Powerflashers to solve that, too

      • flexflip says:

        Powerflasher has let it known that the Flex 4 SDK will not be supported until FDT 4 Milestone 3. Your workaround is given as preferred way to deal with this issue. See bugtracker issue mentioned in previous post for more info.

  3. [...] This post was mentioned on Twitter by piotraschke, FDT Team and Aiden Tailor, Bruno Fonzi. Bruno Fonzi said: If can't wait for FDT4 M3 -> @aidentailor: Just blogged: FDT – switching to Flex 4 SDK – http://tinyurl.com/ylfvlp9 [...]

  4. [...] Aiden Tailor wrote a great blog post on how to set up the Flex 4 SDk with FDT. You can check it out here [...]

  5. John Barrett says:

    Excellent post!!, you Rock`-`

    I just followed and got it working with no problems. I updated a post based on this to use the Flash player 10.1. I hope you don’t mind`-`

  6. John Barrett says:

    thanks for the mention`-`

  7. PiKE says:

    Nice work, I try Flex but now I’m back with FDT.

  8. brooklyn says:

    I am a new user of FDT; I followed the steps you described, but I still have the same error (playerglobal.swc); Can’t understand why it is difficult to start writing code after paying money for FDT? It is not fair.

  9. Scott says:

    Anyone tried targeting Flex 4.1 SDK with FDT 3.5? I can compile but the the debugger won’t work.

    Thanks,

  10. flexflip says:

    @Scott
    I’m trying to compile a project targeting Flex 4 SDK using FDT 3.5 now. Have not managed to set it up without Eclipse errors. Which steps did you take to get it running?

  11. Samuel Jonasson says:

    I am also trying to target Flex 4.1 with FDT 3.5 SR1. I can compile and run – but I cant launch the debugger.

    Did you find a solution?

  12. Rob says:

    Thought you might be interested to hear that we got this to work with FDT3 and Adobe Flex SDK 4.5. Very good solution. Thanks!

    • Altoid Muncher says:

      How did you manage to get this working in FDT3(I am using 3.5) when FDT3.5 only seems to allow preset SDK types with the location of swc hardcoded. How did you manage to add core.swc vs flex.swc+utilities.swc to the build path?

  13. Altoid Muncher says:

    Nvm, you can just add the core.swc as a project dependency

  14. Iphone pas cher…

    I conceive you have observed some very interesting details , thanks for the post….

Leave a Reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>