[TxMt] AS3/Flex, how to begin?

Simon Gregory simon at helvector.org
Wed Oct 31 11:32:50 UTC 2007


> One question though; where is a sensible place to set any extra  
> arguments that are passed to mxmlc at compilation time (Apple-B)?   
> I need to add a -default-size argument to the compiler but can't  
> see where.  I don't want to edit the build script but I want to put  
> it in the 'right' place.  Is there a project specific variable I  
> could use?

There are two ways to do this, firstly you could choose the Build  
(custom) command and have it execute your own script. However I'd  
recommend that you use a build-config.xml file which mxmlc reads when  
it beings the compilation process. You should see that it reads  
{flex_sdk_home}/frameworks/flex-config.xml (you can open this file by  
running the Configuration > Open flex-config.xml command) as the  
first step of compilation. By default mxmlc will also search for a  
config file in the same directory as your Main.as or Main.mxml file  
with a -config.xml suffix (so Main-config.xml).

In your case the contents of the file should be:

<flex-config>
	<default-size>
		<width>100</width>
		<height>200</height>
	</default-size>
</flex-config>

Hope this helps.
Simon



More information about the textmate mailing list