Tuesday, April 24, 2007


In ActionScript projects you can set the width, height, background color and frame rate of the project by using the SWF tag. It should be placed directly before the root class This, like many other undocumented metatags, is a shortcut for compiler parameters. Example:

[SWF(width="800", height="600" frameRate="30", backgroundColor="#FFFFFF")]
public class MyRootClass extends Sprite {

An Adobe reference can be found here.

1 comment:

ionous said...

if you use "keep-generated-actionscript" when you build your flex application, you can see some additional parameters and usages for tags.

SWF for instance also includes:

"Flex", "ActionScript" and possibly "MXML" are probably trademarks of Adobe Systems Incorporated.
"Adobe" is a trademark of Adobe Systems Incorporated.
This site is in no way endorsed or sponsored by Adobe Systems Incorporated.
Content Copyright © 2007 Daniel Freiman.
Site Design Copyright by its copyright holder.
The Flex Non-Docs reserves the right to remove comments for any reason.
All ActionScript and MXML code (and ONLY ActionScript and MXML code) on this website is available under the MIT License.