Flash 使Starling框架与使用本机DisplayObject的类一起工作
我试图在一个Starling框架项目中使用Greensock LoaderMax,但是由于Starling有很多自己的类,我如何使它与其他使用本机类的类一起工作 经验: 将返回错误:Flash 使Starling框架与使用本机DisplayObject的类一起工作,flash,actionscript-3,displayobject,gsap,starling-framework,Flash,Actionscript 3,Displayobject,Gsap,Starling Framework,我试图在一个Starling框架项目中使用Greensock LoaderMax,但是由于Starling有很多自己的类,我如何使它与其他使用本机类的类一起工作 经验: 将返回错误: Error: Implicit coercion of a value of type com.greensock.loading.display:ContentDisplay to an unrelated type starling.display:DisplayObject. 你的main菜单.swfma
Error: Implicit coercion of a value of type com.greensock.loading.display:ContentDisplay to an unrelated type starling.display:DisplayObject.
你的
main菜单.swf
main类需要扩展starling.display.Sprite
因为它们是不同的结构等等。。。flash无法将本机精灵转换为八哥精灵
然后在加载完成后:
mm=queue.content作为精灵;//(starlig)
如果仍要使用普通DisplayObjects和Starling DisplayObjects,则需要将它们放置在扩展不同DisplayObjects的不同mc/sprites中
舞台
||
starling.display.Sprite->在这里您可以添加普通的基于starling的Sprite/MovieClips
||
flash.display.Sprite->您可以在这里添加本机精灵/MovieClips
Error: Implicit coercion of a value of type com.greensock.loading.display:ContentDisplay to an unrelated type starling.display:DisplayObject.