i’m looping through xml, attaching mcs, etc…
that’s all working great. basically i’m making a drop down menu.
what i need is a function for the button that triggers the drop down which takes the dynamic height of the mc into consideration and drops the menu down (animates with actionscript) the appropriate amount.
here’s my actionscript:
stop();
myXml= new XML();
myXml.ignoreWhite=true;
myXml.onLoad=function(success){
if(success){
trace(this);
myArray=myXml.firstChild.childNodes;
trace(myArray);
for(i=0; i<myArray.length; i++){
holder._y= myArray.length*-24;
dynHeight= myArray.length*24;
item=holder.attachMovie("dynClip", "dynClip"+i, i, {_x:0, _y:(24*i)+1})
item.name=myArray*.attributes.name;
_root.dropButton.onRelease=function(dynHeight){}
}
}
}
myXml.load("menu.xml");
i’m not very adept at actionscripted movement yet so i was thinking of doing something like this:
_root.dropButton.onRelease=function(dynHeight){
for(j=0; j<dynHeight; j++){_root.holder._y--;}
obviously that ain’t right! Do i need to use setInterval somehow? anybody???