Drop-down menus

 

Let's take again the example described in part Swish2. You just need to replace Menus actions with the following scripts.

For sprites popup1 popup2 popup3, you 'd yield :

onFrame (3,afterPlacedObjectEvents) { stop(); }
onFrame (5,afterPlacedObjectEvents) { stop(); }
onFrame (1,afterPlacedObjectEvents) { stop(); }

Expanding sprite MENU in Outline, you 'd yield :
- for button Menu1

on (rollOver) {
      playSound("Beep2.wav",true);
      tellTarget (_root.popup1) { gotoAndPlay(2); // enable popup1 }
       // unabling all others
      tellTarget (_root.popup2) { gotoAndPlay(4); }
      tellTarget (_root.popup3) { gotoAndPlay(4); }
       // etc...
}

- for button Menu2

on (rollOver) {
      playSound("Beep2.wav",true);
      tellTarget (_root.popup2) { gotoAndPlay(2); // enable popup2 }
       // unabling all others
      tellTarget (_root.popup1) { gotoAndPlay(4); }
      tellTarget (_root.popup3) { gotoAndPlay(4); }
       // etc...
}

- for button Menu3

on (rollOver) {
      playSound("Beep2.wav",true);
      tellTarget (_root.popup3) { gotoAndPlay(2); // enable popup3 }
       // unabling all others
      tellTarget (_root.popup1) { gotoAndPlay(4); }
      tellTarget (_root.popup2) { gotoAndPlay(4); }
       // etc ...
}

that's all !

 


Page chargée en 0.001 sec.

Dernière Modification : Sam 14 Octobre 2023 9:48
Copyright © 1999-2024 Jean-Paul Molina Tous droits réservés.

 

to Google