Coded SWF Properties in Flash Builder 4
i want to add a SWF metadata tag to an ActionScript Project in Flash Builder 4, that denote开发者_StackOverflows the default size and background color of the swf.
i can do this in Flash Professional, but it doesn't work with ActionScript projects in FB4? can i not include this tag? i know i can set these properties in the properties panel, but i'd like to have them in my code.
oh, never mind. dumb move on my part. this metadata tag needs to be place just before the class declaration.
[SWF(width="1800", height="600", frameRate="60", backgroundColor="#0")]
public class Test extends Sprite
{
...
}
This works, but it seems to throw a warning in Flash Builder 4.7
To resolve the warning, the meta data line must precede directly before the Class function.
package{
import xyz;
[SWF(width='640',height='480',backgroundColor='#6cf354',frameRate='25')]
public class main extends Sprite {
精彩评论