SWF metadata in pure AS3 projects

When creating pure AS3 projects a metadata is required to define how the swf functions. This metadata is inserted after your import statements and before the main class definiton.

Here are the parameters you can use with the swf metadata tag:

[SWF(width=”x”,
height=”x”,
widthPercent=”x”,
heightPercent=”x”,
scriptRecursionLimit=”x”,
scriptTimeLimit=”x”,
frameRate=”x”,
backgroundColor=”x”,
pageTitle=”x”)]

Example usage:

package  {
	import flash.display.Sprite;
	[SWF(backgroundColor="#FFFFFF", frameRate="30",
		width="550", height="400")]
	public class Main extends Sprite {

	}
}

One Response to “SWF metadata in pure AS3 projects”

  1. A Says:

    Brilliant, was looking all over for this. Thanks.