I’m trying to learn actionscript…uphill battle.
I have two movie clips.
When I rollover mc1, I want it to move mc2 to a position 108.7 from mc2’s original position.
I right-clicked mc1, selected Actions and placed the following code on it:
onClipEvent (load) {
_x = 0;
_y = 0;
div = 5;
}
onClipEvent (enterFrame) {
_parent.mc2._x += (endX-_x)/div;
_parent.mc2._y += (endY-_y)/div;
_parent.mc1.onRollover = function() {
_parent.mc2.onEnterFrame = function() {
endX = 108.7;
endY = 0;
};
}
}
Problem is, when I rollover mc1, it cause mc2 to move right off of the screen. It won’t stop at the position of 108.7.
I’m pretty sure the way I wrote the code is messed up. I took bit’s and pieces from other examples to get this to work. Or not work in this case.
Thanks for any help