Flash CS4:如何在单击按钮时播放影片剪辑
我想在单击按钮时播放影片剪辑。
我做了 3 种状态:
inicial (how it looks before anything happens) (up) hover (plays an animation after waiting 20 frames) (over) click (plays an animation right away) (down)
我将这些影片剪辑放置在按钮的向上、向上和向下帧内。这非常有效,除了当我单击时,我需要单击并按住动画才能通过第一帧。
我该怎么做才能单击按钮并完整播放影片剪辑?
I want to play a movie clip when I click a button.
I made 3 states:
inicial (how it looks before anything happens) (up) hover (plays an animation after waiting 20 frames) (over) click (plays an animation right away) (down)
I placed these movie clips inside of my button's up, over, and down frames. This works great except when I click, i'll need to click and hold for my animation to get past the first frame.
What can I do so that I click on my button and plays the movie clip in its entirety?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您在 IDE 中创建一个按钮:
由于按钮“按下”状态仅在其实际“按下”时注册,因此您需要在按下鼠标时触发的按钮外部关联一个影片剪辑。
您需要准确定位它,或者将其包裹在另一个符号中。
...
或者更好的是,在 AS3 中对整个事情进行编程并摆脱时间线开发...
更新 -
我没有任何首选的教程或网站,特别是。但只需谷歌搜索“as3 按钮教程”,您应该会得到很多点击... 这个 看起来相当完整。
哦,等等 - 我想我发布了一个基本图像按钮的类,可以轻松更改该按钮以与库中的影片剪辑一起使用...是的,它是正确的 此处。如果您有 as3/面向对象编程的经验,基本思想应该相当清晰。如果不是 - 谷歌离开;)
干杯
Assuming you're creating a button in the IDE:
Because the button "down" state is only registered while its actually "down", you'd need to associate a movieclip outside of the button that is triggered on mouse down.
You'd need to position it accurately, or wrap it up in another symbol.
...
Or better yet, program the whole thing in AS3 and get away from timeline development...
update -
I don't have any preferred tutorials or sites for this, in particular. But just google "as3 button tutorial" and you should get a lot of hits... this one looks pretty complete.
Oh, wait - I think I posted a class for a basic image button that could be easily altered to function with movieclips from the library... yep, its right here. The basic idea should be fairly clear if you have any experience with as3 / object oriented programming. And if its not - google away ;)
Cheers