# Why is this blur not working?

**URL:** <https://forum.kirupa.com/t/why-is-this-blur-not-working/202302>\
**Category:** flash\
**Created:** [September 29, 2006, 2:24pm UTC](https://forum.kirupa.com/t/why-is-this-blur-not-working/202302 "2006-09-29T14:24:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mejnik](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@mejnik](https://forum.kirupa.com/u/mejnik)\
**Post date:** [September 29, 2006, 2:24pm UTC](https://forum.kirupa.com/t/why-is-this-blur-not-working/202302/1 "2006-09-29T14:24:10Z")

</div>

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
