function DisplayInfo(){
menu_mc._visible = false;
infobox_mc._visible = true;
infobox_mc.content_txt.text = this.location_text;}// close_btn is in infobox_mc ands restores// the menu (clearing the info text and hiding itself as well)
infobox_mc.close_btn.onRelease = function(){
menu_mc._visible = true; infobox_mc._visible = false;
infobox_mc.content_txt.text = “”;
}
infobox_mc._visible = false;
// start the info box hidden
// define basic variables for setting up the menuvar
item_spacing = 28;
// how far menu items are spaced veritcally
var item_count = 0; // counts menu items as they are added from the XML
// CreateMenu creates a menu based on the XML object passed.
// It loops through all the items with a for loop adding clips to the menu_mc
// movieclip on the timeline, defining the appropriate text where neededfunction
CreateMenu(menu_xml){
// start with the first item in the XML
var items = menu_xml.firstChild.firstChild.childNodes;
// menu -> menuitems -> child nodes array
for (var i=0; i<items.length; i++) {
// only continue if the type of this item is a squirrel
if (items*.attributes.type == “squirrel”) {
// create variables for our elements
var species = items*.firstChild; // same as items*.childNodes[0]
var location = items*.childNodes[1]; // second child node
// Create a menu item movie clip in the menu_mc instance on the main timeline
// for each item element offsetting each additional further down the screen
var item_mc = menu_mc.attachMovie(“menu_item”,“item”+item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
// assign text using nodeValue to get the text
// from the text nodes and CDATA sections
item_mc.species_txt.text = species.firstChild.nodeValue;
item_mc.main_btn.location_text = location.firstChild.nodeValue;
// set the onRelease of the item button to the DisplayInfo function
item_mc.main_btn.onRelease = DisplayInfo;
}
}
}
// manage XML
// create new XML object instance, remembering to ignore white spacevar
squirrel_xml = new XML();squirrel_xml.ignoreWhite = true;
// define an onLoad to create our location menu when the XML has successfully loaded.squirrel_xml.onLoad = function(success){
if (success) CreateMenu(this);
else trace(“Error loading XML file”);
// no success? trace error (wont be seen on web)}
// load the xml file!
squirrel_xml.load(“squirrel_finder.xml”);
var myBlur = new flash.filters.BlurFilter(20,20,2);
var myTempFilters:Array = menu_mc.filters; //->which MC must be here to get the wanted result???
myTempFilters.push(myBlur);
menu_mc.filters = myTempFilters;
menu_mc.onRollOut = function() {
myBlur.blurX = 20;
myBlur.blurY = 20;
this.filters = new Array(myBlur);
}
menu_mc.onRollOver = function() {
myBlur.blurX = 0;
myBlur.blurY = 0;this.filters = new Array(myBlur);
}
THX for any help you can provide