Copy link to clipboard
Copied
Hi all
I would like to setup an actionscript project in FB from which i could compile classic SWF and IPA iOS from the same source code. Is it possible? How to achieve this?
Copy link to clipboard
Copied
Hi,
You can make two projects (one mobile and one flash) that refer to a common source directory - just go to your project settings and go to ActionScript Build Path and add a new Source Path folder. It should now show inside your projects as a gray folder with [source path] in front. Put your iOS and flash specific launch code in the separate projects.
Cheers,
Jarrod
Copy link to clipboard
Copied
Probably better to have the shared code as a library project, methinks. However, same concept, just differently organised.
G
Copy link to clipboard
Copied
'Better' is contentious. With Flash Builder, I always symlink folders in preference to libraries. I'm wary of trusting the IDE to properly traverse the dependency tree when building complex projects - sometimes you need to make spurious rebuilds, or worse still, you're using old code and not realising it. Assuming incremental compiling/linking, it shouldn't be much of a compilation time cost, but it will be a lot more robust to include all the source directories explicitly.
As an aside, my last company used to keep a minimal copy of all referenced SDKs as part of the project, thus allowing multiple projects to be on separate versions of the SDK and to cause check-ins to be completely atomic, that is, the SDK upgrades (and custom modifications) would match up with code-base changes and be part of the repository. It's a strategy that I've adopted, but it does take some time to prune down all your SDKs.
Jarrod
Copy link to clipboard
Copied
Yep, I'll go with "contentious".
Advantages, for me, are that I have two or three big chunks of relatively static code and having them precompiled as .SWC saves me an age in build times, but having the code there as libraries, means I can also debug through them if I need to.
That said, I agree with all your downsides too...
G
Copy link to clipboard
Copied
I haven't personally noticed increased compile times from linking in directories with incremental compiling, but perhaps this is different for release builds. Each to their own 😉
Copy link to clipboard
Copied
I think it's affected by the size and complexity of the library... (especially if there are lots of embedded assets).
But, the difference between linking via a .swc in /libs and linking via a project linked as a library _without_ copying the SWC can be a number of seconds for each build... which adds up when you have "Build automatically" set.
G