我开发的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();
上一篇:如何重新启动与ActionScript 3的Flash应用程序重新启动、应用程序、ActionScript、Flash
下一篇:的Flex / AIR /动作脚本/移动File.writeObject /的readObject总是产生空瓦特/生成错误脚本、错误、动作、AIR