views:

38

answers:

1

I've got a flex action script project that consists of 3 AS files. I'd like to use the Flex frame work so I can add some components and other functionality.

How can I go about converting this Action Script project into a Flex project with a .mxml file?

I'm using Flash Builder 4.

thanks

A: 

You could create a new Flex Project and in the Properties panel go to Actionscript Build Path and add the folder with your AS classes to the source path.

This will allow you to import your classes within your Flex project and have access to their methods & properties.

Since you'll be creating a Flex project , it seems likely that you'll want to modify these classes and adapt them to your new project. In this way, you'll be able to delegate some of the previous AS3 classes to Flex components.

PatrickS
I don't see any option for Actionscript Build Path in the new projects properties panel...
Adam
Try Flex Build Path
PatrickS
I've gone to Flex Build Path, then I click the "Source Path" tab and "Add Folder". is this correct? Should I add the entire project folder or just the src directory? I'm at a bit of a loss what the next step would be to import all the class files to get this example up and running again within the flex frame work. I'm abit green when it come to action script even more so with classes. I really appreciate your help.
Adam
Yes it's correct. Simply add the "src" directory. Flash Builder will then know about your classes and to access them in your new Flex project should be as simple as creating an instance of the main class and adding it to the stage.
PatrickS