# (FMX)Beginner needs help! :))I'm desperate

**URL:** <https://forum.kirupa.com/t/fmx-beginner-needs-help-im-desperate/86554>\
**Category:** flash\
**Created:** [April 13, 2005, 9:37pm UTC](https://forum.kirupa.com/t/fmx-beginner-needs-help-im-desperate/86554 "2005-04-13T21:37:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![faraonul33](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@faraonul33](https://forum.kirupa.com/u/faraonul33)\
**Post date:** [April 13, 2005, 9:37pm UTC](https://forum.kirupa.com/t/fmx-beginner-needs-help-im-desperate/86554/1 "2005-04-13T21:37:39Z")

</div>

this is the script a found in XML driven drop down menu from this site:  
[font=Times New Roman]GenerateMenu = function(container, name, x, y, depth, node\_xml) {[/font]

[font=Times New Roman]var curr\_node;[/font]

[font=Times New Roman]var curr\_item;[/font]

[font=Times New Roman]var curr\_menu = container.createEmptyMovieClip(name, depth);[/font]

[font=Times New Roman]for (var i=0; i\<node\_xml.childNodes.length; i++) {[/font]

[font=Times New Roman]curr\_item = curr\_menu.attachMovie(“menuitem”,“item”+i+"\_mc", i);[/font]

[font=Times New Roman]curr\_item.\_x = x;[/font]

[font=Times New Roman]curr\_item.\_y = y + i\*curr\_item.\_height;[/font]

[font=Times New Roman]curr\_item.trackAsMenu = true;[/font]

[font=Times New Roman]curr\_node = node\_xml.childNodes\*;[/font]

[font=Times New Roman]curr\_item.action = curr\_node.attributes.action;[/font]

[font=Times New Roman]curr\_item.variables = curr\_node.attributes.variables;[/font]

[font=Times New Roman]curr\_item.name.text = curr\_node.attributes.name;[/font]

[font=Times New Roman]if (node\_xml.childNodes\*.nodeName == “menu”){[/font]

[font=Times New Roman]curr\_item.node\_xml = curr\_node;[/font]

[font=Times New Roman]curr\_item.onRollOver = curr\_item.onDragOver = function(){[/font]

[font=Times New Roman]var x = this.\_x + this.\_width - 5;[/font]

[font=Times New Roman]var y = this.\_y + 5;[/font]

[font=Times New Roman]GenerateMenu(curr\_menu, “submenu\_mc”, x, y, 1000, this.node\_xml);[/font]

[font=Times New Roman]var col = new Color(this.background);[/font]

[font=Times New Roman]col.setRGB(0xf4faff);[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]}else{[/font]

[font=Times New Roman]curr\_item.arrow.\_visible = false;[/font]

[font=Times New Roman]curr\_item.onRollOver = curr\_item.onDragOver = function(){[/font]

[font=Times New Roman]curr\_menu.submenu\_mc.removeMovieClip();[/font]

[font=Times New Roman]var col = new Color(this.background);[/font]

[font=Times New Roman]col.setRGB(0xf4faff);[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]}[/font]

[font=Times New Roman]curr\_item.onRollOut = curr\_item.onDragOut = function(){[/font]

[font=Times New Roman]var col = new Color(this.background);[/font]

[font=Times New Roman]col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0});[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]curr\_item.onRelease = function(){[/font]

[font=Times New Roman]Actionsthis.action;[/font]

[font=Times New Roman]CloseSubmenus();[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]}[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]Createmainmenu = function(x, y, depth, menu\_xml){[/font]

[font=Times New Roman]GenerateMenu(this, “mainmenu\_mc”, x, y, depth, menu\_xml.firstChild);[/font]

[font=Times New Roman]mainmenu\_mc.onMouseUp = function(){[/font]

[font=Times New Roman]if (mainmenu\_mc.submenu\_mc && !mainmenu\_mc.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)){[/font]

[font=Times New Roman]CloseSubmenus();[/font]

[font=Times New Roman]}[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]CloseSubmenus = function(){[/font]

[font=Times New Roman]mainmenu\_mc.submenu\_mc.removeMovieClip();[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]Actions = Object();[/font]

[font=Times New Roman][color=red]Actions.gotoURL = function(urlVar){[/color][/font]

[font=Times New Roman][color=red]getURL(urlVar, “\_blank”);[/color][/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]Actions.message = function(msg){[/font]

[font=Times New Roman]message\_txt.text = msg;[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]Actions.newMenu = function(menuxml){[/font]

[font=Times New Roman]menu\_xml.load(menuxml);[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]menu\_xml = new XML();[/font]

[font=Times New Roman]menu\_xml.ignoreWhite = true;[/font]

[font=Times New Roman]menu\_xml.onLoad = function(ok){[/font]

[font=Times New Roman]if (ok){[/font]

[font=Times New Roman]Createmainmenu(10, 10, 0, this);[/font]

[font=Times New Roman]message\_txt.text = “message area”;[/font]

[font=Times New Roman]}else{[/font]

[font=Times New Roman]message\_txt.text = “Eroare:fisierul XML nu a fost incarcat!”;[/font]

[font=Times New Roman]}[/font]

[font=Times New Roman]};[/font]

[font=Times New Roman]menu\_xml.load(“menu1.xml”);[/font]

The red marked text is the problem. i don’t know how to load a swf file in a blank (empty) movie clip which a named **contents.** i changed \_blank into \_self but i have to put the menu movie clip over and over again. i even tried with loadMovie, but it has the same result.  
pls, give me a solution!!! there are already two days of head ake. don’t let me die!!!
