PDA

View Full Version : [FMX].mc control problem



TheMerryMaker
August 8th, 2003, 06:05 PM
what im trying to do here is have a button's (named btn) over and out states make a movie clip play forward or reverse. and my fla is named MCC. im fairly new so the more detailed explaination of the code the better.

this is my code so far in the MC


onClipEvent (enterFrame) {
if (btn.MCC(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}

kode
August 8th, 2003, 07:46 PM
onClipEvent (enterFrame) {
if (_parent.btn.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
And add this line of code to the Frame Actions:
Button.prototype.hitTest = MovieClip.prototype.hitTest;

TheMerryMaker
August 8th, 2003, 08:55 PM
woohoo, thanks a bunch. now the maddness can begin

kode
August 8th, 2003, 08:57 PM
No problem. ;)