关于FLASH下拉菜单的代码的问题
1.新建一个文档,新建一个影片剪辑元件【菜单一】就是实现上图中的菜单一效果。现在编辑影片剪辑【菜单一】,在场景一的第一帧中插入一个蓝色矩形。在蓝色矩形的位置上输入文字“菜...
1.新建一个文档,新建一个影片剪辑元件【菜单一】就是实现上图中的菜单一效果。现在编辑影片剪辑【菜单一】,在场景一的第一帧中插入一个蓝色矩形。在蓝色矩形的位置上输入文字“菜单一”,具体位置自己可以调整。在第二帧中插入关键帧,在蓝色矩形下方加入等宽灰色矩形。新建元件按钮【第二级菜单】,在按钮元件中输入“第二级菜单”,具体怎么修饰这个按钮不言。将新建的按钮元件拉人到灰色的矩形上面。 2.在影片剪辑【菜单一】的第一帧中插入“stop();”(不含引号),并将属性中帧名命名为“menu_off”,第二帧帧名命名为“menu_on”。至于按钮【第二级菜单】的链接等怎么处置不言了,影片剪辑菜单一编辑结束!!! 3.返回场景一,将【菜单一】拖入舞台,单击【菜单一】,在动作面板中输入以下代码:onClipEvent (load) {previouslyOver = false;}onClipEvent (enterFrame) {currentlyOver = this.hitTest(_root._xmouse,_root._ymouse,true);if (!previouslyOver and currentlyOver) { previouslyOver = true; this.gotoAndStop("menu_on");} else if (previouslyOver and !currentlyOver) {previouslyOver = false;this.gotoAndStop("menu_off");}}添加其他一级菜单和二级菜单可以模仿添加,到此一个弹出菜单就做好了,具体美化和功能可根据自己设计来修改。
这个下拉菜单教程做出的效果是鼠标滑过,即弹出下拉菜单,请问我应该怎样改代码,才能让flash场景中按钮效果为“按下”即弹出下拉菜单?
onClipEvent (load) {previouslyOver = false;}onClipEvent (enterFrame) {currentlyOver = this.hitTest(_root._xmouse,_root._ymouse,true);if (!previouslyOver and currentlyOver) { previouslyOver = true; this.gotoAndStop("menu_on");} else if (previouslyOver and !currentlyOver) {previouslyOver = false;this.gotoAndStop("menu_off");}}
怎样改动下面的代码,高手求解~~~!!!!急急急急急~~~~
有加分!!!!!!!!
onClipEvent (load) {
previouslyOver = false;
}onClipEvent (enterFrame) {
currentlyOver = this.hitTest(_root._xmouse,_root._ymouse,true);
if (!previouslyOver and currentlyOver) {
previouslyOver = true; this.gotoAndStop("menu_on");
} else if (previouslyOver and !currentlyOver) {
previouslyOver = false;
this.gotoAndStop("menu_off");
}
}
就是这段代码怎么改?? 展开
这个下拉菜单教程做出的效果是鼠标滑过,即弹出下拉菜单,请问我应该怎样改代码,才能让flash场景中按钮效果为“按下”即弹出下拉菜单?
onClipEvent (load) {previouslyOver = false;}onClipEvent (enterFrame) {currentlyOver = this.hitTest(_root._xmouse,_root._ymouse,true);if (!previouslyOver and currentlyOver) { previouslyOver = true; this.gotoAndStop("menu_on");} else if (previouslyOver and !currentlyOver) {previouslyOver = false;this.gotoAndStop("menu_off");}}
怎样改动下面的代码,高手求解~~~!!!!急急急急急~~~~
有加分!!!!!!!!
onClipEvent (load) {
previouslyOver = false;
}onClipEvent (enterFrame) {
currentlyOver = this.hitTest(_root._xmouse,_root._ymouse,true);
if (!previouslyOver and currentlyOver) {
previouslyOver = true; this.gotoAndStop("menu_on");
} else if (previouslyOver and !currentlyOver) {
previouslyOver = false;
this.gotoAndStop("menu_off");
}
}
就是这段代码怎么改?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询