mxmlc 编译没有错误,但显示空白屏幕
我已经关注到这里了 并用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您说运行 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