I'm building my first website with AS3, and I'm using Flash Builder 4 to create/edit my AS classes. I have two .fla files (preloader.fla and portfolio.fla) which I both published as .swc and loaded them into my ActionScript project in FB4 (build path). When I hit debug, FB4 automatically generates a .SWF in bin-debug folder called Preloader.swf, but in my Preloader.as I have
new URLRequest("Portfolio.swf");
and this Portfolio.swf isn't being generated by itself. Now the real question; how can I tell FB4 to automatically create both .SWF files for me? Or isn't that poss开发者_如何学Goible, any workaround then?
Thanks.
You cannot use Flash Builder to compile FLA files. Only Flash Pro CS3/CS4/etc can compile FLA files. They are two separate IDE's meant for building two separate types of applications.
There is a hack you can use so that when you hit 'compile' in Flash Builder, it will automatically open Flash Pro CS4 and compile your FLA for you, but this is really only a workaround, and doesn't save you much. Here are two sites talking about this method:
- Test Movie from Flex to Flash (easy way)
- Compiling Flash Files from Flex
(PS: In case you didn't know, 'Flex Builder 3' is the old version of 'Flash Builder 4'. They renamed it, but it's the same product. 'Flash Pro CS5/CS4/CS3/8/MX2004/MX' is the separate product that works with FLA's.)
I am not sure about whether FB4 can generate/compile an SWF, but it might be worth giving us an indication of what you want to achieve by doing that. It may be that a more framework based system could be built to operate based on the external data/assets loaded? I dont really want to use the term CMS, but a back-end content/configuration that can set up the framework as required?
精彩评论