Posted By

jeffnehlsen on 06/25/11


Tagged


Versions (?)

Main.as for XML Accordion Menu


 / Published in: ActionScript
 

URL: http://www.jeffnehlsen.com/

Creating and using my Accordion Menu

  1. package {
  2. import flash.display.MovieClip;
  3. import flash.events.Event;
  4.  
  5. /**
  6. * ...
  7. * @author Jeff Nehlsen
  8. */
  9. public class Main extends MovieClip {
  10. private var loader:XMLLoader;
  11. private var menu:AccordionMenu;
  12.  
  13. public function Main() {
  14. loader = new XMLLoader();
  15. loader.addEventListener(Event.COMPLETE, xmlLoaded);
  16. loader.loadXML("test.xml");
  17. }
  18.  
  19. private function xmlLoaded(e:Event):void {
  20. trace("Creating menu");
  21. menu = new AccordionMenu(loader.xml);
  22. addChild(menu);
  23. }
  24.  
  25. }
  26.  
  27. }

Report this snippet  

You need to login to post a comment.