Flash AS3 流体导航栏
我对 AS3 感到很糟糕。我已经通过多种不同的方式尝试过这种效果。我正在尝试在 AS3 中获得一个具有类似功能的导航栏。
A|B|C|D
单击 C 栏幻灯片,您会得到
C|A|B|D
单击 D 条幻灯片,您会得到
D|A|B|C
等等。
非常感谢帮助或帮助链接。现在我就这么多了。
david_btn.addEventListener(MouseEvent.CLICK, menuNav);
kate_btn.addEventListener(MouseEvent.CLICK, menuNav);
robin_btn.addEventListener(MouseEvent.CLICK, menuNav);
aaron_btn.addEventListener(MouseEvent.CLICK, menuNav);
ken_btn.addEventListener(MouseEvent.CLICK, menuNav);
ann_btn.addEventListener(MouseEvent.CLICK, menuNav);
function menuNav(event:MouseEvent):void {
gotoAndStop(event.target.name);
}
每个都转到影片剪辑,播放一半然后停止。现在我需要在进入下一个指定标签之前播放另一半。
I'm horrible with AS3. I've tried this effect a number of different ways. I'm trying to get a navigation bar in AS3 that does something like this.
A|B|C|D
click on C bar slides and you get
C|A|B|D
click on D bar slides and you get
D|A|B|C
and so on.
Help or a link to help is much appreciated. Right now I have this much.
david_btn.addEventListener(MouseEvent.CLICK, menuNav);
kate_btn.addEventListener(MouseEvent.CLICK, menuNav);
robin_btn.addEventListener(MouseEvent.CLICK, menuNav);
aaron_btn.addEventListener(MouseEvent.CLICK, menuNav);
ken_btn.addEventListener(MouseEvent.CLICK, menuNav);
ann_btn.addEventListener(MouseEvent.CLICK, menuNav);
function menuNav(event:MouseEvent):void {
gotoAndStop(event.target.name);
}
Each goes to the movieclip, plays half way and stops. Now I need to play the other half before going to the next specified label.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您好,我已经给 Jascha 的答案加上了一个,因为它达到了目的,但是我只是将引导您完成下面的代码,以便您可以理解这种事情是如何实现的。它还具有许多额外的检查/配置等。
Hi I've given Jascha's answer the plus one because it serves the purpose, however I'm just going to walk you through the code below so you can understand how this sort of thing is achieved. It also has a number of extra checks/configurations etc.
只需确保第一个按钮的初始 x 位置为 14。或者相应地调整代码。
此处示例 http://www.hupcapstudios.com/slideNav.swf
Just make sure the first buttons initial x position is 14. Or that you adjust the code accordingly.
example here http://www.hupcapstudios.com/slideNav.swf