使用 AS3 在 Flash 中导航。代码不起作用
我的导航代码无法正常工作。我对动作脚本不太精通,有人能指出我做错了什么吗?提前致谢
//nav
var home:int = 1;
var about:int = 2;
var projects:int = 3;
var press_id:int = 4;
var contact:int = 5;
home_mc.addEventListener(MouseEvent.CLICK, home);
about_mc.addEventListener(MouseEvent.CLICK, about);
projects_mc.addEventListener(MouseEvent.CLICK,projects);
press_mc.addEventListener(MouseEvent.CLICK, press_id);
contact_mc.addEventListener(MouseEvent.CLICK, contact);
function navbuttonclick(event:MouseEvent, myFrame:Number):void {
gotoAndStop(myFrame);
}
Im having trouble getting my nav code working. I am not very proficient in actionscript, can anyone spot out what im doing wrong? Thanks in advance
//nav
var home:int = 1;
var about:int = 2;
var projects:int = 3;
var press_id:int = 4;
var contact:int = 5;
home_mc.addEventListener(MouseEvent.CLICK, home);
about_mc.addEventListener(MouseEvent.CLICK, about);
projects_mc.addEventListener(MouseEvent.CLICK,projects);
press_mc.addEventListener(MouseEvent.CLICK, press_id);
contact_mc.addEventListener(MouseEvent.CLICK, contact);
function navbuttonclick(event:MouseEvent, myFrame:Number):void {
gotoAndStop(myFrame);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)