0

I use FlashDevelop - I am working on code in ActionScript 3. I started working on a 72hour project for Ludum dare and afterwards decided to get a fresh start with a new angle on the same idea. So I named the folder - GameName2 . .

I always use the same 'project' for things I work on in ActionScript 3 because I have code in that project that is useful for my game ideas. For instance a basic controller class. Now in the new game, I want to again inherit from that controller class, however I fear that since the name I'll pick for the new class is a duplicate of the name I used in the first version of this game, this will cause future difficulties and confusion..

I was wondering if there is any way to use namespaces or anything else, so I could have classes with the same name in different packages and avoid confusion when I import the packages for a specific game..

Right now:

I have:

gamename.controller.GameNameController

and

gamename2.controller.GameNameController

Is there any way to keep things more simple and clean? Thanks

Thanks for any input.

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
AturSams
  • 7,568
  • 18
  • 64
  • 98

1 Answers1

1

You can get around this using an application domain which is documented here, I would also recommend you create a Library SWC for your own framework code, so you can just import a SWC for reuse.

There is a third party plugin referenced from the FlashDevelop site to help you Export a SWC from FlashDevelop.

Neil
  • 7,861
  • 4
  • 53
  • 74
  • Thanks for opening my eyes to a simple way to contain my framework without making the code too cluttered. – AturSams Sep 18 '12 at 15:14