highlight active menu item

  • aquarii88
  • Born
  • Born
  • aquarii88
  • Posts: 1

Post 3+ Months Ago

Ok so I found this script but it doesn't work. My buttons are not in a movieclip, and the instance names are but1-6

Code: [ Select ]
var BTNarr:Array = [but1,but2,but3,but4,but5,but6];

for(i=0; i<BTNarr.length; i++){
  BTNarr[i].onRollOver = OVER;
  BTNarr[i].onRollOut = OUT;
  BTNarr[i].onPress = PRESS;
}
function OVER(){
  if(!this.over)
    this.gotoAndStop(2);
}
function OUT(){
  if(!this.over)
    this.gotoAndStop(1);
}
function PRESS(){
  if(!this.over){
    noDowns();
    this.gotoAndStop(3);
    this.over = true;
  }
}
function noDowns(){
  for(i=0; i<BTNarr.length; i++){
    BTNarr[i].gotoAndStop(1);
    BTNarr[i].over = false;
  }
}
  1. var BTNarr:Array = [but1,but2,but3,but4,but5,but6];
  2. for(i=0; i<BTNarr.length; i++){
  3.   BTNarr[i].onRollOver = OVER;
  4.   BTNarr[i].onRollOut = OUT;
  5.   BTNarr[i].onPress = PRESS;
  6. }
  7. function OVER(){
  8.   if(!this.over)
  9.     this.gotoAndStop(2);
  10. }
  11. function OUT(){
  12.   if(!this.over)
  13.     this.gotoAndStop(1);
  14. }
  15. function PRESS(){
  16.   if(!this.over){
  17.     noDowns();
  18.     this.gotoAndStop(3);
  19.     this.over = true;
  20.   }
  21. }
  22. function noDowns(){
  23.   for(i=0; i<BTNarr.length; i++){
  24.     BTNarr[i].gotoAndStop(1);
  25.     BTNarr[i].over = false;
  26.   }
  27. }


The script is on a new layer called actions. Can anyone tell me why this script has NO effect whatsoever? If anyone needs or wants to look at my fla I can link you to it. Fundage is certainly available since I'm in a rut!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

seems that this keyword doesn't work for buttons, so better transform the buttons in movieclips

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.