开发者

Coded SWF Properties in Flash Builder 4

开发者 https://www.devze.com 2023-01-12 02:48 出处:网络
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 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.

Coded SWF Properties in Flash Builder 4


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 {
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号