I was wondering if anyone could help with this problem I’m having.
Here is the code from this site for easing.
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;
}
and here is mine I changed it a bit but I still don’t see why it doesn’t work?
this is the problem! You have to assign the X and Y positions to the variables but right now you assign the variables to the X and Y positions!
so it should be
ok wait, i just tested it and that wont work either, so you just have to stick with the original code. that is the only way i have ever seen it and the way i have always wrote it. if pom says you cant THEN LISTEN he knows his ActionScript.
*Originally posted by mdipi.com *
**if pom says you cant THEN LISTEN he knows his ActionScript. ** I’m not saying you can’t do it that way, I’m just saying that you’re not moving the darn clip :beam:
Thanks for the help, I guess my question now is why does the position of the movieclip have to start at 0,0, why not somewhere else? Cause this is what I was trying to do. I would have a button that was draggable and when you let go it would ease back to its initial position. I guess theres no way around it I have to have it start at 0,0. Thanks again for everyones help.