ActiveDen

mySectionedMenu (xml)

May5th, 2008 : File was re-uploaded. Fixed all bugs reported previously

An easy to manage, xml-based, iPod-ish tree menu..

Features:

  • XML BASED TREE MENU
  • HAVE AS MUCH AS 5 LEVELS DEEP FOR EACH MAIN MENU !
    MORE LEVELS CAN BE ADDED UPON REQUEST
  • AUTO SCROLL FOR HEIGHT MORE THAN DEFAULT HEIGHT
  • ROLL MOUSE WHEEL BACKWARDS TO COLLAPSE SUB SECTIONS
  • CHOOSE TO RUN A FUNCTION OR LAUNCH AN EXTERNAL LINK *
  • MOTION BLUR EFFECT *
  • ADJUST WIDTH /HEIGHT/SPEED/UPPERCASE/MAX CHARACTER ETC *
  • ALL STORED WITHIN ONE MAIN MOVIECLIP FOR EASY IMPORTING
  • ONLY RELATED MENU ARE CREATED WHEN CALLED , REST ARE DESTROYED
  • ALSO USING FUSEKIT FOR SLICK TWEENING
Note:You will need FuseKit installed to get this file to work, it is very easy to install, dont worry :) you can get it for free here



Related file(s):

myScrollMenu-vertical (xml)


myScrollMenu-Horizontal (xml)

AATW - added along the way

  • Using chars like ó ú é etc… – 23 Feb 08 – on line frame 1 in ‘mysectionedMenu’ in library add at the beginning
    System.useCodepage = true;
    Next, get into ‘menu’ movieClip, doubleClick the text, select the text box, see properties panel, click the embed button, you will see uppercase, lowercase, numeric & punctuation are selected, you can select more by ctrl+click the respective additional font packages which you need.

  • Home btn to reset menu – 23 Feb 08 – Create a btn on stage, give it an instance name: “homeBtn”. on frame 10 in ‘mySectionedMenu’ add script below at the end:
    homeBtn.onRelease = function(){
        if(root.curLevel != undefined){
            root.curLevel = undefined;
            getSubs();
        }
    }
    
  • Clicked menu stay highlighted – 23 Feb 08 – Pls add following scripts in ‘mySectionMenu’ movieClip found in library. On Frame 10:
    1. for ‘rollin’ & ‘rollout’ functions put a if statement in it:
      rollin = function () {
          if(this.no != root.hit){
              this.gotoAndPlay("in");
          }
      };
      rollout = function () {
          if(this.no != root.hit){
              this.gotoAndPlay("out");
          }
      };
      
    2. for ‘releaseIt’ & ‘getSubs’ functions put this at the beginning:
      var m:MovieClip = mainHol["lev"+root.curLevel].levHol["m"+root.hit];
      if(this.no != root.hit){
          m.gotoAndPlay("out");
      }
      root.hit = this.no;
      
  • Execute a function with parameters + LoadMovie – 25th Oct 07
    1. a param value needs to be sent via xml, it cant be someFunction(param) as it will execute even before clicking any buttons.. so do it like this instead:
      <sub title="Experimental" url="someFunction" params="movie1.swf, something"  target="" type="function"></sub>
      
    2. next get into ‘mySectionedMenu’ mc from library, on frame 1’s actionscript on line 34, 46, 59, 72 & 85. you will need to store the params value into the array.. add this at end of the array like this:
      line 34:
      ... , rootNode[i].attributes.params]);
      line 46:
      ... , rootNode2[ii].attributes.params]);
      line 59:
      ... , rootNode3[iii].attributes.params]);
      line 72:
      ... , rootNode4[iv].attributes.params]);
      line 85:
      ... , rootNode5[v].attributes.params]);
      
    3. next on frame 10’s actionscript locate releaseIt function and

      change this:

      var f:Function = _root[menu[this.no][2]];
      trace("RUN FUNCTION: "+menu[this.no][2]);
      f();
      
      to this:
      var f:Function = _root[menu[this.no][2]];
      var p:String = menu[this.no][6];
      var parameters:Array = p.split(", ");
      trace("RUN FUNCTION: "+menu[this.no][2]);
      f(parameters[0], parameters[1]);
      
    4. lastly, edit the ‘someFunction’ function on the root

      change this:

      someFunction = function(){
          trace("Hi im from a function!")
      }
      
      to this:
      someFunction = function(p1:String, p2:String){
          //p1 will give the value "movie1.swf" as add in the xml
          //p2 will give the value "something" as add in the xml
          trace("> "+p1);
          trace("> "+p2);
          //load movie function:
          //make sure on _root there is an empty movieclip
          //with the name movieHolder
          _root.movieHolder.loadMovie(p1);
      }
      


by
by
by
by
by