You must be logged in to post Login Register
Search 

reload vertical menu

User Post

10:54 am
August 24, 2010


Xiaz

Member

posts 3

1

Post edited 5:57 pm – August 24, 2010 by Xiaz


I really love the vertical menu tutorial, I will be a great asset to my project if I can only find a way to reload the menu. I have been trying for about a week now, with no success. please can someone help me reload this great menu

this is the error I'm getting

TypeError: Error #2007: Parameter url must be non-null.at flash.net:URLStream/load()at flash.net::URLLoader/load()at Vert_fla::MainTimeline/btn_click()

here is what I tried

var a = “menu.xml”
var b = “menu2.xml”

btn1.addEventListener(MouseEvent.CLICK,btn_click);
btn2.addEventListener(MouseEvent.CLICK,btn_click);

/////my function to unload and reload the menu/////
function btn_click(event:MouseEvent){
var selected_list:String
if(event.target == btn1){
menuHolder.removeAll();
selected_list = a;

}else if(event.target == btn2){
menuHolder.removeAll();
selected_list = b;

}
loader.load(new URLRequest(selected_list));
}

/////loads my xml /////
var xml:XML;
var loader.load(new URLLoader();

loader.load(new URLRequest(“menu1.xml”));
loader.addEventListener(Event.COMPLETE,xmlLoaded);

function xmlLoaded(e:Event):void{
if ((e.target as URLLoader) !=null){
xml = new XML(loader.data);
createMenu();
}
}

/////holder that contains items/////

var menuHolder:MovieClip = new MovieClip();


                            

11:14 pm
August 25, 2010


Xiaz

Member

posts 3

2

There has to be a way to reload the vertical menu, I am wishing I was not new to coding. I looked up everything I could on reloading and tried many different things, and all failed. Please can a knowledgable as3 coder help me reload this menu?

Topic RSS 
Search