hi,
I have been trying in vain to get my onEnterFrame function working. here’s how it is:
I have my 5 buttons created in a loop where text is added and my button functions are added.
I have this for onRollOver:[“myBtn”+i].
[“myBtn”+i].onRollOver = function() {
//create pointer mc over button
var pointer = this.attachMovie(“buttonPointer”, “pointer_mc”, 21);
with (pointer) {
_x = this._width/2;
_y = -5;
this.onEnterFrame = function() {
if (pointer._y<2) {
pointer._y += 1;
} else {
delete this.onEnterFrame;
}
};
this.name_txt.textColor = 0xFFFFFF;
}
///////okay, now I have this on my rollOut:
onRollOut = function() {
this.onEnterFrame = function() {
if (pointer._y>0) {
pointer._y -= 1;
} else {
delete this.onEnterFrame;
}
};
this.name_txt.textColor = 0x000000;
};
};
Okay, now when i roll over my mc the pointer mc is attached and it is moves downwards to the required spot, on rollOut nothing happens. I know i cant have two onEnterFrames on the same mc, and i figure that the rollOut cancels the original but how can i get around this. I mean i still want to place the onEnterFrame where it is, but is there code that will make this work ??
thanks for any help
Greg