我想做一个和这个网页(
http://www.flash-game-design.com ... flash-tutorial.html)有相同效果的网页,不知为何我做的菜单没有反应,好像code执行到第二行就没有往下执行了,请高手指教。多谢!
stop();
contentMC.gotoAndStop("home");
current = menu.home_button;
setMove = true;
yMove = -10;
menu.home_button.onPress = function(){
if (this != current){
current._y = 0;
setMove = true;
contentMC.gotoAndStop("home");
current = this;
}
}
menu.corp_button.onPress = function(){
if (this != current){
current._y = 0;
setMove = true;
contentMC.gotoAndStop("corp");
current = this;
}
}
menu.bio_button.onPress = function(){
if (this != current){
current._y = 0;
setMove = true;
contentMC.gotoAndStop("bio");
current = this;
}
}
menu.oil_button.onPress = function(){
if (this != current){
current._y = 0;
setMove = true;
contentMC.gotoAndStop("oil");
current = this;
}
}
menu.sub_button.onPress = function(){
if (this != current){
current._y = 0;
setMove = true;
contentMC.gotoAndStop("sub");
current = this;
}
}
menu.career_button.onPress = function(){
if (this != current){
current._y = 0;
setMove = true;
contentMC.gotoAndStop("career");
current = this;
}
}
menu.contact_button.onPress = function(){
if (this != current){
current._y = 0;
setMove = true;
contentMC.gotoAndStop("contact");
current = this;
}
}
this.onEnterFrame = function(){
if(setMove){
if(yMove , current._y){
current._y --;
}else{
setMove = false;
}
}
}