I started a thread earlier but didn´t quite get what I wanted so I´ll try again.
In this tut http://www.kirupa.com/developer/mx/easing_mouseclick.htm
the MC that is used always starts in the top left corner of the swf. If you change the _x and _y in the (load) sentence the MC just begins at the position you told it and slides to the _x=0 and _y=0 position.
I want it to stay put at the position I told it to and the when activated (by clicking the mouse) move to the mouse.
Don’t use ._x and ._y… Just move it to where you wnat in the original movie…
Or you can have the movieclip be off stage before you set it to where you wnat it by using ._x and ._y… Another thing you might want to look for is if the movieclip is placed ina set location in any other frames… That can screw things up as well.
You see this is the weird part. This is the code in the MC that makes the effect.
[AS]
onClipEvent (load) {
_x = 0;
_y = 0;
speed = 5;
}
onClipEvent (mouseDown) {
endX = _root._xmouse;
endY = _root._ymouse;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}[/AS]
And I tried setting the x and the y to different values whit the result that the MC starts at the chosen postition and then slides to the 0,0 position. I don´t get it why it always slides back to 0,0 when nothing tells it to?!
I ever tride removing the _x and _y values but the MC still stays put at the 0,0 position… really scary :chinaman: