CreateJS play a child movieclip

丶灬走出姿态 提交于 2019-12-12 00:32:51

问题


If you have a child movieclip on stage with an animation in it, can you have the main timeline play the child movieclip at a certain timeline?

mc_child is a 20 frame animation with this.stop() at frame one so that it is paused at the beginning.

If you add the code this.mc_child.play() or this.mc_child.gotoAndPlay(5) you get an error in createJS. "Uncaught TypeError: Cannot read property 'play' of undefined."

How do you make child movieclips play at a certain frame?


回答1:


You can use gotoAndPlay(5);

Have a look at the EaselJS documentation: http://www.createjs.com/docs/easeljs/classes/MovieClip.html



来源:https://stackoverflow.com/questions/31793811/createjs-play-a-child-movieclip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!