Custom Menu


First off, lets create a bunch of functions for our menu, add as many as you need, I'm using three, the reason why I'm using functions for this
is because it is a lot easier to edit

Flash ActionScript
  1.  
  2. function one()
  3. {
  4. getURL(\"https://www.aussieferal.com\");
  5. }
  6. function two()
  7. {
  8. getURL(\"https://www.tutnation.com\");
  9. }
  10. function three()
  11. {
  12. gotoAndPlay(SOME FRAM NAME OR NUMBER);
  13. }



Now edit the menu!


Flash ActionScript
  1.  
  2. NewMenu = new ContextMenu();
  3. NewMenu.hideBuiltInItems();




Hide the in built menu buttons

Create the new buttons



Flash ActionScript
  1.  
  2. NewMenu.customItems.push(new ContextMenuItem(\"TITLE HERE\", menuChoiceOne));
  3.  
  4. NewMenu.customItems.push(new ContextMenuItem(\"Copyright AussieFeral.com\", menuChoiceTwo));
  5.  
  6. NewMenu.customItems.push(new ContextMenuItem(\"GO TO SOME PLACE IN THE FLASH MOVIE\", menuChoiceThree));



Make the new meny


Flash ActionScript
  1. this.menu = NewMenu;




Enjoy!

I hope you learnt a bit from this tutorial, and I've broken up the code
so you can't just copy and past ;) you'll actually learn something this way.

Cheers, comments welcome.
chrism's Avatar
Author:
Views:
2,492
Rating:
There are currently no comments for this tutorial, login or register to leave one.