A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: dynamic Menu calling from a data base

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    5
    i am having problems with a dynamic menu calling from a data base. The menu with its submenu shows up but always the last menu button doesnt show its sub menu. I am using cold fusion to input the menu variables.

    This is what flash reads to generate the menu system.

    &News_List=Current,Archieve&News_Links=Current.cfm ,Archieve.cfm&Products_List=Box 1,box 2,box 3&Products_Links=box.cfm,box.cfm,box.cfm&Company_L ist=company 1,conpany 2,company 3&Company_Links=company.cfm,company2.cfm,company3. cfm&Contact_List=Contact 1,Contact 2&Contact_Links=Conatact.cfm,Contact2.cfm&Stafflis ting_List=Staff 1,Staff 2,Staff 3&Stafflisting_Links=Staff1.cfm,Staff2.cfm,Staff3. cfm&Status=1&

    if you goto
    http://calbox.com/menu.html
    you can see that the submenu work for all but the staff buttton. The cold fusion is outputting the info it needs for the staff button, but flash isnt displaying it. If i add a another menu button then the staff submenu shows. Its always the last menu button that dosent show its submenu.

    Here is the script from the flash that generates the menu submenu.
    MC_Over._visible = 0;
    // depth
    depth = 1;
    // hide the origional clips
    MC_Over.Sub._visible = 0;
    // split up the array by looking for the commas
    tmp = "_level0." add hidID add "_List";
    set ("Sub_array", eval(tmp).split(","));
    tmp2 = "_level0." add hidID add "_Links";
    set ("Link_array", eval(tmp2).split(","));
    // get the length of the array
    Sub_length = Sub_array.length;
    // set the start y position (x position depends on where you put it on the screen)
    yposition = -60;
    // looping everything
    for (i=0; i<Sub_length; i++) {
    // Name position
    duplicateMovieClip (MC_Over.Sub, "Sub" add i, depth);
    // URL position
    setProperty ("MC_Over.Sub" add i, _y, yposition);
    // Name and URL values
    set ("MC_Over.Sub" add i add ".Text", Sub_array[i]);
    set ("MC_Over.Sub" add i add ".URL", Link_array[i]);
    depth++;
    // YPOS Must be adjusted per button size
    yposition = yposition+30;
    }

    plz help



  2. #2
    Member
    Join Date
    Apr 2001
    Posts
    54
    code is hard to read, but i think you want to load menu items as specified in your document? correct? ok. Take a look at my open source fla that i wrote. I just finished the exact same thing only with text files. Shouldnt be difficult at all to switch to variables from a database.

    http://www.webdude.20m.com/Dynamics.html
    hope that helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center