I got some help way back when from Medyman in regards to XML and events with an image and blurb. The AS is clean, simple and perfect for the situation. The only problem I am having right now is the menu the AS builds from the XML, builds itself, with no real variables to help it blend (i.e. fonts style, colour and positioning.
I tried to move the MC from the library onto the stage and position it and assign font styles and it still builds in the top left corner. The AS is below, I just need help figuring out how to assign the menu to a MC so I can do all the above things mentioned.....
Any help would be great as I am drawing blanks.Code:var xml:XML = new XML(); xml.ignoreWhite = true; // Variables var Images; var Events; var current:Number = 0; xml.onLoad = function(success) { Images = xml.firstChild.childNodes Events = xml.firstChild.childNodes buildNavigation(); } function buildNavigation() { for(i=0;i<Images.length;i++) { var item:MovieClip = this.attachMovie("menu_item", "menu_item_"+i, i); item._y = i*24; item.id = i; item.title_text.text = Images[i].childNodes[0].firstChild item.onRelease = function() { showImage(this.id); } item.onRollOver = over; item.onRollOut = out; } } function showImage(node) { image_holder.loadMovie(Images[node].childNodes[1].firstChild); event_caption.text = Events[node].childNodes[2].firstChild } xml.load("events.xml");




Bookmarks