0

I am porting an existing project from Flash Pro to Flash Builder.

The code is almost completely portable between Web/Android/Projector/AIR, and I simply change a few constants for each target device before hitting publish...

However- in Flash Builder, it asks me when creating a project whether it will be mobile or web.

What's the best-practices way to target multiple devices from a single project in Flash Builder?

OR, in Flash Builder, must they each be their own project? If they must each be their own project- is there a multi-project organization method which works well, keeping in mind that in this context each project is really just a different build of the almost-identical codebase (On one foot- I thought of having a "common" project which would hold most classes, and then each build-project instantiates a Main class from there...)?

Thanks!

davidkomer
  • 3,020
  • 2
  • 23
  • 58

1 Answers1

1

You can create a mobile project with one codebase and select multiple devices (android, ios, blackberry playbook). If you also want a web version, you should be able to specify that codebase in the build path for your web version. You do that by going to Properties --> Actionscript Build Path. Click Source Path and then browse to the folder that contains those files. So yes, you can create a different Main.as, if you need to, for each project. Although in Actionscript the entrypoint class generally has the same name as the Project itself.

You'll then be able to modify one set of files, but the modifications will apply both to the original project and to any project which references those files in this way.

David
  • 703
  • 1
  • 15
  • 31
  • So you're saying- one project for mobile, one project for web- but put their code in a separate "common" folder and add that to each project's build path? – davidkomer Oct 30 '11 at 09:13
  • Hi David - sorry for delay in responding. That's almost right. You put the *common* code -- common to both -- in a folder (which may contain subfolders) and add that to each project's build path. – David Nov 04 '11 at 19:00