Hi friend
Please help with removeMovieClip,
i am using this script in the 1st frame to load external XML file
this.createEmptyMovieClip("container", this.getNextHighestDepth());
var myXML:XML = new XML();
var links:Array = new Array();
myXML.load("myMenu.xml");
myXML.ignoreWhite = true;
myXML.onLoad = function (success:Boolean){
if(success){
loadMenu(this.firstChild.childNodes);
}
}
function loadMenu(menuItem:Array) {
//Loading mainmenu from XML
for (var i = 0; i<menuItem.length; i++) {
item = loadHere.attachMovie("itemClip", "itemClip"+i, i);
item._x = 0;
item._y = 20*i;
item.itemLabel.text = menuItem*.attributes.name;
item.movieUrl = menuItem*.attributes.movieUrl;
item.onRelease = function() {
_root.container.loadMovie(this.movieUrl);
};
}
//Loading submenu tag in XML file
for (var j = 0; j<menuSub.length; j++) {
sub = loadHere.attachMovie("subClip", "subClip"+j, j);
sub._x = 0;
sub._y = 20*j;
sub.subLabel.text = menuSub[j].attributes.name;
sub.movieUrl = menuSub[j].attributes.movieUrl;
sub.onRelease = function() {
_root.container.loadMovie(this.movieUrl);
};
}
}
stop();
in the same frame i have another button , on release i want the actionscript to unload this menu , please help how??
i tried using
_root.myXML.removeMovieClip();
but seems not working out , please help.