Jan 27, 2012

Changing output swf name

Today, I got an interesting problem where I had 4 Flex projects, all had Main.as as their default application file and all dropping their outputs to a common folder.
If you just read this problem, it doesn't seem to be a problem at all (at least I thought so initially), however the problem appears when your want to use all these four project's output SWFs in different pages. And the actual problem is that all of these four projects produce Main.swf as their output thus whoever is the last executable project, gets its bits dropped at the folder and remaining three are left crying.

Now the solution to this problem is also very simple. Just use -output switch in compiler arguments.
In Flex/Flash builder, go to Project > Properties > ActionScript Compiler and add following line inside Additional compiler arguments:

-output=C:/dev/project/bin-debug/Project1.swf

Do this for each project and change the name of swf in above argument.
Good to go...

No comments:

Post a Comment

I love comments.