PDA

View Full Version : Flex Output SWF



Garfty
May 4th, 2009, 03:22 AM
Currently creating a pure Actionscript Application within Flex, ( Really just playing about to see what it can do ).

Currently when you create a new application it sets out all of the folders for you, and creates an SWF with the same name as the project. Is there anyway to change the name of the swf created to say index.swf.

I am aware I can create the new swf in the flash ide and go from there, but this is really just a question to see if it's possible. I am aware the is the compiler arguments, and also there is an argument -o="" or -output="", however when I use this argument and an exact path to where I want it to go Flex throws me an error.
Any help would be appreciated

:top_hat:

wvxvw
May 4th, 2009, 03:27 AM
Flex uses Ant tasks to build the output (i.e. it compiles SWF, generates HTML wrapper, service files etc and then creates output directory and copies everything there). You may write your own tasks, and maybe change the existing ones... I haven't tried it though :)

Garfty
May 4th, 2009, 05:22 AM
Much appreciated wvxvw, I've done a little research and digging, and found a few nice articles, I'll try and post them on here late with what I've found out.

So far I have my ant file linked with a build.properties files which specifies the locations of certain directories, from this I specify which ${uniqueName}.as file I would like to compile and then output the ${uniqueName}.swf file in the deploy directory with any specified name in the build.xml ant file.

This is all just a play around at the moment to see what I can do, I'm aiming to have a single assets.fla and then import all of the elements from the compiled assets.swf. The reason I'm trying this is because I admire the way that flash develop sets up a new project effortlessly ( a cracking editor ). As I work on mac's I would like to do the same with the flex builder application but also modified a little for myself.

Thank you for the help!