3
votes

How can I set up a project in Flash Builder for creating a collection of classes that is not an application by itself? When creating an Actionscript project it forces having a main application file, as well as sets up the whole bin-debug folder and such.

For instance, if you wanted to start coding something like Tweener, Papervision, or some other set of classes that doesn't publish to an application, how would you set up the project in Flash Builder?

4

4 Answers

1
votes

In File menu:

New - > FlexLibraryProject

Then New -> ActionScriptClass :)

0
votes

I am using Flex 3, but i imagine it's the same in Flash Builder. If you right click in the Flex Navigator panel, go to New > Project, that will create an empty project. You can then set up your package structure and add classes as needed.

0
votes

The fact that FlashBuilder creates a whole project doesn't really matter. I usually create an Actionscript project and use the main class as an entry point to the set of classes I want to create.

In the project properties, I add a folder in my source path, and inside this folder I create the packages I want to work with

source directory //added to the source path 
    com/  // the set of classes i'm working on
      mydomain/
          mainpackage /

This way my classes are totally independent from my project.

0
votes

If I understand you question correctly, then when you create an actionscript class you can't run/debug it only view it.

You should do the following:

  • right click on the project folder(the one with the flash logo on the folder) in your Package Explore window

  • click on Properties

  • click on ActionScript Applications (2nd from the top, in the left column)

  • click on the Add... button (it's on the right)

  • then select your as file/s

  • Click on OK

  • Click OK again

And the you can run your ActionScript class :-)