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 !

 


Si vous aimez le site

 

Select a language if you need :


Page chargée en 0.004 sec.

Dernière Modification : Mer 25 Janvier 2017 8:56
Copyright © 1999-2017 Jean-Paul Molina Tous droits réservés.

to Google