Simple bit of code, a loop that attaches a movie clip, which in turn contains a button. Now, when the button triggers an onRollOver, I need to be able to move the clip which the button resides in. I can’t get it to work, and I think it’s a scope thing;
(where ident_btn is the instance name of the button in the dynamically attached mc):
for (var i=0; i <= 15; i++) {
identID = "ident" + i;
var tempgrid = grid_mc.attachMovie("ident_proto", identID, grid_mc.getNextHighestDepth());
tempgrid.ident_btn.onRollOver = function() {
// MOVE THE CLIP THIS BUTTON BELONGS TO
}
tempgrid.ident_btn.onRollOut = function() {
// UN MOVE THE CLIP THIS BUTTON BELONGS TO
}
Any suggestions?