Variables and XML

Hi,

I have the following code I’m working with:


gridx=28;
gridy=28;
num=0;
for (var i=0;i < 22;i++)
{
  for (var j=0;j < 22;j++)
  {
    square_mc.duplicateMovieClip("square"+num,num);
    mc=this["square"+num];
    mc._x=gridx*i;
    mc._y=gridy*j;
    num++;
  }
  
}

dot._visible=0;

function createbox_fn(k){
    for (k=11; k < 65;k++)
{
var srini =this["square"+k];
srini._alpha = 0;

}    
};

createbox_fn();


This is creating a series of little squares from the square_mc movieclip and it’s erasing boxes numbered 11 through 65. What I need to be able to do is to use XML to change these numbers. So that if I change the XML document, for example to the number 33, then the actionscript will be changed to read k=33, thus erasing box number 33. Does that make any sense? I have some experience with XML but don’t know how to just plug it into a situation like this.

Please help and thank you for the help!