Mark A. Donohoe
Mark A. Donohoe

Reputation: 30368

How can I create a shared import folder for ActionScript and Flash?

Vet developer but new to Flash. I have a structure like this

MyProjA
  |-- MyProjA.fla
  |-- MyProjA.as
  |-- Common         <-- Common code for all projects
      |--Common.as
MyProjB
  |-- MyProjB.fla
  |-- MyProjB.as
  |-- Common      <-- Duplicate of the one in MyProjA
      |--Common.as

...and what I want is this...

MyProjA
  |-- MyProjA.fla
  |-- MyProjA.as

MyProjB
  |-- MyProjB.fla
  |-- MyProjB.as

Common         <-- *Not* necessarily in the same folder as MyProjA and MyProjB
  |--Common.as

...where the Common thing can be anywhere on a disk (but may be a sibling to the other projects.) As such, I would like to designate a particular folder as being part of the include path, the same way you do in C/C++, etc.

Howyadoodat?

Upvotes: 0

Views: 102

Answers (2)

user797257
user797257

Reputation:

If you must develop in AS2, there are tools that offer way better project management and code editing then Flash CS#. A free editor: FlashDevelop, and a commercial one FDT (they are different things, not a version of the same editor).

Both of them can be configured to use MTASC compiler (FlashDevelop comes bundled with it by default). A much better compiler then what Adobe ships with Flash CS#.

These are very common in the Flash-related world, and Flash CS is almost never used to do any kind of serious programming, so, probably, those are the way to go.

Upvotes: 0

Mark A. Donohoe
Mark A. Donohoe

Reputation: 30368

Aaah! Just found it! Here's what you do...

  1. Make your .fla file active in the editor
  2. Go to File -> Publish Settings...
  3. Click the wrench to the right of the Script dropdown (top right)
  4. In the 'Source path' tab, add your root 'Shared' folder
  5. Then just import as normal (i.e. use subfolder names with your packages)

Hope this helps!

Upvotes: 1

Related Questions