Adding Component Usability from Flex to Your Actionscript Project

Today I was in need of a quick alert box but realized the mx.controls.Alert is not included in the accessible packages when creating an Actionscript project.

Well, after a bit of searching I found it was really quite easy. Though I imagine it bloats your app due to the component libraries added. Here it goes:

1. Right click on your project>properties

2. Select Actionscript> Build Path> Library Path

3. Add an swc, within this box you can either browse to your respective framework folder or type the following

${PROJECT_FRAMEWORKS}/libs/framework.swc

4. Repeat step 3 but with

${PROJECT_FRAMEWORKS}/locale/{locale}

Now you should be able to access things like mx.controls.Alert

if ${PROJECT_FRAMEWORKS) doesn’t work you can try ${FRAMEWORKS} and that should work. Otherwise just browse to your framework folder in the sdk folder

::Edit::
So it looks like in theory this would have worked, except that Adobe made their swc files very dependent upon a bunch of other things so unfortunately this just gives errors.
I’ll be looking into it more and seeing what I can find to fix this.

Posted

in

by

Tags:

Comments

One response to “Adding Component Usability from Flex to Your Actionscript Project”

  1. Jeff Avatar
    Jeff

    Nice try my friend. We tried that starting the asLib2 project and the “official” word from Adobe is that you can’t mix AS3 and Flex components unless you do so within the Flex environment (the MXML structure.) Thanks for that Adobe.

Leave a Reply