mxmlc 编译没有错误,但显示空白屏幕

发布于 2025-01-02 05:57:57 字数 999 浏览 4 评论 0原文

我已经关注到这里了 并用flex3.6和flex4.6编译,但运行swf会出现空白屏幕。使用 FDT 5 http://fdt.powerflasher.com/ 编译的同一程序运行良好。那么命令行中缺少什么?

更新:我使用的命令行与

mxmlc "c:\flextutorial\HelloWorld.as"

上面的教程中的相同。

更新 2:它不能与 FlashDevelop ( http://www.flashdevelop.org/ ) 一起运行。但为什么 FDT 5 (http://fdt.powerflasher.com) 却如此呢?

我的HelloWorld.as源代码

package {

    import flash.display.Sprite;
    import flash.text.TextField;

    public class HelloWorld extends Sprite {

        public function HelloWorld() {
            var display_txt:TextField = new TextField();
            //display_txt.x = 0;
            //display_txt.y = 0;
            display_txt.text = "Hello World!";
            //display_txt.backgroundColor = 0xFF0000;
            addChild(display_txt);
        }

    }
}

I have followed tut here
http://www.senocular.com/flash/tutorials/as3withmxmlc/
and compiled with flex3.6 and flex4.6 but running swf gives a blank screen. Same program compiled with FDT 5 http://fdt.powerflasher.com/ and runs fine. So what's missing in the command line ?

Update: command line I used is just

mxmlc "c:\flextutorial\HelloWorld.as"

the same as in the tutorial above.

Update 2: It doesn't run either with FlashDevelop ( http://www.flashdevelop.org/ ). But why it does with FDT 5 ( http://fdt.powerflasher.com ) ?

My source code of HelloWorld.as

package {

    import flash.display.Sprite;
    import flash.text.TextField;

    public class HelloWorld extends Sprite {

        public function HelloWorld() {
            var display_txt:TextField = new TextField();
            //display_txt.x = 0;
            //display_txt.y = 0;
            display_txt.text = "Hello World!";
            //display_txt.backgroundColor = 0xFF0000;
            addChild(display_txt);
        }

    }
}

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

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

发布评论

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

评论(1

神也荒唐 2025-01-09 05:57:57

当您说运行 SWF 时,您可以将其嵌入 HTML 页面并在同一浏览器上查看吗?您可以使用 2 个 Flash 播放器版本(一个在 FD IDE 内,另一个在 FD IDE 内)。

还要安装 Flash 调试器播放器
http://wwww.adobe.com/support/flashplayer/downloads.html

When you say running the SWF, can you embed it in a HTML page and view both on the same browser? You could be using 2 flash player versions (one inside the FD IDE and the other)..

Also install the Flash Debugger Player
http://wwww.adobe.com/support/flashplayer/downloads.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文