Been ages since i did flash work, about a year i think so forgot a few things.
Any to the point, my xml menu in flash. Just having a ponder over a source file from a related flash site and this small piece of code im having trouble understanding.Code:curr_item = curr_menu.attachMovie("menuitem", "item"+i+"_mc", i);More specifically curr_menu.submenu_mc.removeMovieClip();Code:if (node_xml.childNodes[i].nodeName == "menu") { //sets the curr_item.node_xml to curr node - curr_node = node_xml.childNodes[i] i of this loop not the first 1 curr_item.node_xml = curr_node; // If mouse moves over or is clicked outside the menu and held down and then moves over //run the following function curr_item.onRollOver = curr_item.onDragOver=function () { // because its a sub menu we have to move the first item across to the right var x = this._x+this._width-1; //dont need to move the mc down as of yet var y = this._y; // runs the funtion at runtime to acctaly place it all on screen GenerateMenu(curr_menu, "submenu_mc", x, y, 1000, this.node_xml); //used for the highlighted effect var col = new Color(this.background); // the highlighted effects colour, in this case a light light grey in hexadecimal format col.setRGB(0xf4faff); }; } else { // if it dont start with menu, means its not a sub menu so the submenu arrow doesnt need to be on the button curr_item.arrow._visible = false; //function curr_item.onRollOver = curr_item.onDragOver=function () { **curr_menu.submenu_mc.removeMovieClip();** var col = new Color(this.background); col.setRGB(0xf4faff); }; }
I assume it might have something to do with ondragover? I know the code works but i dont understand what mc its removing or why it has to remove it. I can post source if this piece of code doesn't explain everything thats going on. If any of my comments are wrong according to the piece of code in which its for please tell me.
Thank you,
Aaron


Reply With Quote