CreateJS播放子动画片段 [英] CreateJS play a child movieclip
问题描述
如果您在舞台上有一个子动画片段并带有动画,您是否可以让主时间轴在某个时间线上播放该子动画片段?
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是一个20帧动画,在第1帧带有this.stop(),因此它会在开始时暂停.
mc_child is a 20 frame animation with this.stop() at frame one so that it is paused at the beginning.
如果添加代码this.mc_child.play()或this.mc_child.gotoAndPlay(5),则会在createJS中出现错误. 未捕获的TypeError:无法读取未定义的属性'play'."
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?
推荐答案
您可以使用gotoAndPlay(5);
看看EaselJS文档: http://www.createjs.com/docs/easeljs/classes/MovieClip.html
Have a look at the EaselJS documentation: http://www.createjs.com/docs/easeljs/classes/MovieClip.html
这篇关于CreateJS播放子动画片段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!