Flash Builder 4 中的编码 SWF 属性

发布于 2024-09-15 16:29:02 字数 260 浏览 3 评论 0原文

我想向 Flash Builder 4 中的 ActionScript 项目添加一个 SWF 元数据标记,该标记表示 swf 的默认大小和背景颜色。

我可以在 Flash Professional 中执行此操作,但它不适用于 FB4 中的 ActionScript 项目?我可以不包含这个标签吗?我知道我可以在属性面板中设置这些属性,但我想将它们放在我的代码中。

替代文字

i want to add a SWF metadata tag to an ActionScript Project in Flash Builder 4, that denotes 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.

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寻找我们的幸福 2024-09-22 16:29:02

哦,没关系。我的举动是愚蠢的。该元数据标记需要放置在类声明之前。

[SWF(width="1800", height="600", frameRate="60", backgroundColor="#0")]
public class Test extends Sprite
     {
     ...
     }

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
     {
     ...
     }
女皇必胜 2024-09-22 16:29:02

这可行,但在 Flash Builder 4.7 中似乎会引发警告

要解决该警告,元数据行必须直接位于 Class 函数之前。

package{
    import xyz;

    [SWF(width='640',height='480',backgroundColor='#6cf354',frameRate='25')]
    public class main 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 {
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文