Hello you expert flash people. I'm in a dilemma and perhaps, I'm sure, i can get some help here. I'm mostly a designer and have been using flash with basic actionscript. Now with the advent of CS3 I want to dive deep in this arena. Can someone out there please help me to do a flash/xml menu which has 3 levels navigation. I've searched and searched but haven't find a concrete solution yet. It would be king and great if I caould have an explanation of how to load external movies from the xml menu as well....please help. Ben
sorry but its not explainable ...at least not with typing ....there is a ton of code to write if you want to do things correctly ;o) ....there are some lazy ways ...but not that effective so start reading up on variables ...global variables ...arrays for the xml child nodes....general XML loading .... the text format class peace John ;o)
Hello there....thanks from you taking the time to reply. Can you simply give me the codes. Can you mail me on benza1a at hotmail.com so that I can email you my file and perhaps you can help me ans we'll post the solution here? Waiting for you response...thanks mate
the menu in the example you provided graphically is build vertical dude ...go in the fla comp & rebuild them horizontal i dont think i can help anymore my friend ...every designer has his own way of doing things i do things the way ... i have learned ! :o) my global variables trace( "this is my way to script an XML MENU...;o)"); stop(); _global.openbox = undefined; _global.box_to_close = undefined; _global.Total_subs = 0; _global.topMenuNum = 0; /////////// top text menu options var Topformat:TextFormat = new TextFormat(); Topformat.font = "Verdana"; // changes to the font type will probably result in adjusting the numbers below. Topformat.size = 11; //<< depending on the font, if you increase this number, you might want to increase _global.top_box_width and _global.sub_box_width Topformat.align = "center"; // other options are "left" and "right" Topformat.color = 0xFFFFFF; // color of the text _global.top_box_width = 7; //<< increasing this number increases the spacing width of the top menu (this number is NOT a 1:1 pixel ratio) _global.top_box_height = 25; //<< increasing this number increases the spacing width of the top menu (this number is a 1:1 pixel ratio) _global.TopTextVerticalOffset = 5; //<< Moves the text further down the y axis (this number is a 1:1 pixel ratio) /////////// sub text menu options var Subformat:TextFormat = new TextFormat(); Subformat.font = "Verdana"; // changes to the font type will probably result in adjusting the numbers below. Subformat.size = 11; //<< depending on the font, if you increase this number, you might want to increase _global.top_box_width and _global.sub_box_width Subformat.align = "center"; // other options are "left" and "right" Subformat.color = 0xFFFFFF; // color of the text _global.sub_box_width = 7; //<< increasing this number increases the spacing width of the submenus menu (this number is NOT a 1:1 pixel ratio) _global.sub_box_height = 25; //<< increasing this number increases the spacing width of the submenus menu (this number is a 1:1 pixel ratio) _global.subTextVerticalOffset = 5; //<< Moves the text further down the y axis (this number is a 1:1 pixel ratio) // this could be set to a number or the stage width. If the top menu ends up exceeding the stage width a new row is started below the current row. Good for a menu with many items _global.row_cutoff = 700; // Thought i would just remind you ;o) // Selling any published or sample code from this file without prior written consent is expressly forbidden. // In other words, its cool to use this file for your own freelance or personal projects, but don't try to sell this off as a template you created! & then there is my menu population var pushoverX = 0; //variable for changing the next position of the attached Movieclip var pushoverY = 0; //variable for changing the next position of the attached Movieclip j = 0; // new var used in the while loop while ( j < _global.topMenuNum) { //while loops repeats for the amount of top menu items var change_width = _global.DisplayName[j].length * _global.top_box_width; // sets width of menu boxes based on text size if ( _global.ID[j] == "TM"){ //attach top menu boxes, linkage name is "box", for more info note4.jpg has code hints... this.entire_menu.attachMovie("box", "box" + j, -(j), { _x:pushoverX , _y:pushoverY } ); with(eval ("entire_menu.box" + j ) ){ // "with" just momentarily changes the scope, so anything written below will occur within the movieclip object of "with" box_shape._width = change_width ; //box_shape is a symbol within each top menu box text_shape._width = box_shape._width; //text_shape is a dynamic textfield within each top menu box textfield = _global.DisplayName[j]; // texfield is set to the DisplayName of its appropriate child set ("entire_menu.box" + j +".menuID", j); // sets up a new variable inside of each top menu equal to its Child row number. The variable is "menuID", and it acts as a local ID for each menu box. } // with statement end } // if statment end pushoverX = pushoverX + eval("entire_menu.box" + j + ".box_shape._width"); // pushes over the x placement of each new box. if ( pushoverX > _global.row_cutoff ){ // if the next x location of the top menu box exceeds this row cutoff limit, then we start a new row (down the y axis) pushoverY = pushoverY + _global.top_box_height; // new row's y location pushoverX = 0; // new row's x location is reset to 0 } j = j + 1; // increase j for the while loop } //end the while loop ///attach a toggle to move the entire_menu movieclip. If you don't want this delete out everything from here down to above the stop(); action entire_menu.attachMovie("move_toggle", "move_toggle1", -100, { _x:pushoverX , _y:pushoverY } ); // "move_toggle" is the Linkage ID name entire_menu.move_toggle1.onPress = function(){ //on press drags the menu entire_menu.startDrag(false, -2000, entire_menu._y, 2000, entire_menu._y); } entire_menu.move_toggle1.onRelease = function(){ // on release stops dragging entire_menu.stopDrag(); } entire_menu.move_toggle1.onReleaseOutside = function(){ // on release Outside stops dragging entire_menu.stopDrag(); } stop(); then my load variables ...Xml comp file ....movie construction ...etc like i said dude ...its just not possible to explain in a forum ;o) peace John
Don't see what you're looking for? Try a search.
|