AS3:影片剪辑脚本停止进行播放时 [英] AS3 : MovieClip script stop when done playing
问题描述
我跟AS3一个初学者,我在使用MovieClip类的问题。 我将通过处理冲突一个简单的脚本,角色,声音等一切工作无缝到目前为止,但是当我开始添加动画,人物将停止在动画周期结束。
I am a beginner with AS3 and I'm having a problem with MovieClip class. I have a character that move through a simple script that handles collision, sound etc. Everything was working seemlessly so far but when I started adding animation, the character would stop at the end of the animation cycle.
是否有人熟悉AS3知道什么是错在这里?
Does someone comfortable with AS3 knows what's wrong here ?
在此先感谢=)
推荐答案
在闪存IDE,尝试一下你的性格,这不是循环,你想要的方式的情况下(这应该是从动画本身之外;从你的性格的容器),然后看在属性标签/窗口内。接近底部,会有一个环不头了,里面有可修改的行为。
Inside the Flash IDE, try clicking the instance of your character that's not looping the way you want it to (and this should be from outside the animation itself; from the container of your character), then look inside the Properties tab/window. Near the bottom, there will be a LOOPING header, and inside there you can modify the behaviour.
如果您有任何这方面的问题,或想有更多的控制动画播放头,可以在例如形式包括脚本的gotoAndPlay(1);
,你可以添加在动画循环的最后一帧告诉Flash从一开始重新播放。帧编号参数不必是1当然。例如,您可以设置一系列动画序列中以统一的时间,并且使用的gotoAndPlay()有他们内部循环,直到事件发生,你直接播放头相同的影片剪辑内的另一个动画循环。
In case you have any problems with this, or otherwise want to have more control over the animation playhead, you can include script in the form of e.g. gotoAndPlay(1);
which you might add at the last frame of your animation cycle to tell Flash to play from the start again. The frame number parameter doesn't have to be 1 of course. You could for example set up a series of animation sequences on a single timeline, and use gotoAndPlay() to have them loop internally, until an event occurs and you direct the playhead to another animation loop inside the same MovieClip.
这篇关于AS3:影片剪辑脚本停止进行播放时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!