Im having a problem referencing AS created movie clips. I have a for loop that creates movie clips, names them, but when i want to give them all the same onRelease event, it doesn’t work. Nor does the move command (_y value) work… The following code would make me 5 boxes, which would take viewer to the same page if clicked…
for (var i = 0; i<xnRoot.childNodes.length; i++) {
xnIzbira = xnRoot.childNodes*;
// trace(xnIzbira.firstChild.nodeValue);
//give it a variable name slikca so i can refer to each of them but it doesn't work
this.createEmptyMovieClip(slikca="navBG"+i, 50-i);
with (slikca) {
beginFill(0xF0F0F0, 100);
lineStyle(1, 0x3B81BF, 80);
moveTo(0, 0);
lineTo(117, 0);
lineTo(117, 17);
lineTo(0, 17);
lineTo(0, 0);
endFill;
}
slikca._y = 1*17;
this.slikca.onRelease = function() {
trace("RollOut");
};
}