|
From: Luke B. <lb...@pa...> - 2007-10-25 22:45:49
|
This is definitely a difficult issue. There are two approaches that we have used in the past, I'd be interested in hearing what others have done. a) Use MTASC and SWFMill - or- MTASC for code and Flash Authoring for only symbol creation. This is most certainly the recommended approach for developing Flash Player lite, 6, 7 or 8 content. This approach allows you to create and reference two different 'main' documents. One for running your test suites and one for running your production application. Each of these are very, very thin classes and can easily include your library SWF whether you create it with SWFMill or Flash Authoring. b) Use Flash Authoring, but #include a different main document depending on whether you're going to production or test suites. What this really means is that you don't put anything meaningful on the main timeline of your FLA, other than maybe a preloader and the #include statement that gets switched. It might looks something like this: #include "Main.as" //#include "MainRunner.as" You just swap which one is commented and each of these included documents just attachMovie with a different MovieClip or instantiate a different Main class. This isn't really recommended, but neither is using Authoring as a compiler, so if you can't move to MTASC, and you're stuck with Authoring, this is the way we've done it in the past. I'd be interested to hear what others have to say. This would conceivably work with the latest version of Authoring by changing the 'Document Class' reference. I just can't imagine going back to non command-line compilation at this point, so I would highly encourage you to look into the first approaches. The one thing that you absolutely, positively do not ever want to do, is create two different FLA files and start trying to manually synchronize the library from one to the other. This will not help you. These two FLA files will inevitably fall out of sync and your test harness will be using a fixture that does not match your production environment. This is very, very bad. Hope that helps, Luke Bayes http://www.asserttrue.com |