嵌入SWF到Flash Builder ---"类型未找到与QUOT;? [英] Embedding swf into flash builder--- "Type was not found"?
本文介绍了嵌入SWF到Flash Builder ---"类型未找到与QUOT;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发的ActionScript手机应用程序。
I am developing mobile app in ActionScript.
林导入的.swf文件,但得到的错误:
Im importing .swf file but get error:
Type was not found or was not a compile-time constant: MySwf.
下面是我的code:
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
public class gyyyyppp extends Sprite
{
[Embed(source='assets/g1.swf')] public static const MySwf : Class;
public function gyyyyppp()
{
stage.align = StageAlign.TOP_LEFT;
var p3:MySwf= new MySwf();
addChild(p3);
}
}
}
我在做什么错了?
What I am doing wrong?
(PS我的SWF文件与非Adobe程序所做的) 我使用Flash Builder
(p.s. my swf file is made with non-adobe program) I'm using Flash Builder
推荐答案
我不认为你可以将嵌入类的变量类型,试试这个:
I don't think you can set the embedded class as the variable type, try this:
var p3:MovieClip = new MySwf();
这篇关于嵌入SWF到Flash Builder ---"类型未找到与QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文