Actionscript 3 - 无法将movieclip转换为按钮?

时间:2011-06-30 12:08:24

标签: actionscript-3 flash-builder

我在fla中创建了一个movieclip,然后我将其导出并加载到as3项目中。

var clazz:Class = BulkLoader.getLoader("assets").getDisplayObjectLoader("mainUI", false).contentLoaderInfo.applicationDomain.getDefinition("box") as Class;

var themc:MovieClip = new clazz as MovieClip;
    addChild(themc);

然而它的出现:

TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip to fl.controls.Button.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()

但我不是把它转换成按钮???

0 个答案:

没有答案