Free FlashDen file of the month. Click here to download.
Search  

MYSECTIONEDMENU (XML)

HomeBrowse CategoriesMenus & ButtonsVertical MenusmySectionedMenu (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);
      }
      


Posted about 1 year ago

ITEM DISCUSSION

Show Comments By

@stuffson
in the library you will find a movieclip named ‘menu’, open it, go to frame 12, select the green box, see properties, change tint color.

@stefancross
if you have not solved your problem, please send me an email with your files, ill what i can do.

Posted 2 months ago

Great file encryptme!

Is there anyway to reference certain menu items so that menu items can be selected/deselected and enabled/disabled from actionscript code?

For example, I have certain situations where the user may select a menu item which calls a function. The menu item is then highlighted (I’m using the stay highlight mod). The user works with the application and may change a setting which will in turn require that the current menu item is deselected and that a new menu item is selected instead (and the function is called for this menu item as well). Does this make sense?

Referencing menu items in this way would be tremendously useful! I hope to hear from you soon. Thanks again for the great work!

Posted 2 months ago

Hello.

Every time I go to change the font type and I publish the file it pixalizes whatever font I chose. Is there a way to fix this?

Posted about 1 month ago

@jv1011
pls make sure the font is embedded, see the properties panel, also in the properties panel check if the anti-aliasing is set to anti-alias for animation or readability.

Posted about 1 month ago

is possible to run a function and both lunch a sublevel? thanks

Posted 25 days ago

@goodkarma
yeah possible, under getSubs function put a call to another function.

Posted 24 days ago

Great file!

I have a tight space to insert this file into. I would like to make all of the bars smaller in height so I can see more menu items. Is there a way to do this?

Thank you in advance.

Dwynes

Posted 20 days ago

@dwynes
sure, just adjust the height or font size in ‘menu’ movieclip found in the library. You’re done. :)

Posted 20 days ago

hey man quick question please…

your menu is able to read from xml file and launch both links and functions when i launch the swf on its own.

BUT if i have a holder file load the swf inside of it, then the menu sees the xml file, loads the menu BUT only works with links BUT NOT functions..

any ideas how to solve this? my function is a simple gotoandstop command which again works fine if the swf is launched outside the holder file.

please help..

the path where the swf loads into is – _root.mcLoader.loadClip(“overview.swf”,_root.page_mc.myLoader);

Posted 14 days ago

@nayyer
this is due to the reference to the function you want to call is lost when you call it from the holder. For an example, from the menu, if you are calling a function like this:

_root.somefunction();
this will only work from within the menu swf.
_root.holder.somefunction();
this will only work from within holder.

so the safest bet is to use _parent. instead so it will work on both ways.

Posted 13 days ago

thank you much encrypt..!!

great file and great support….!

Posted 13 days ago