Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I have this code in my movieClip with the instance name of MC:
  2.  
  3. onClipEvent(mouseUp){
  4.     mdown = setInterval(ease(), 5000);
  5. }
  6.  
  7. And this is my frame coding:
  8.  
  9. function ease(){
  10.     if(_root._xmouse > _root.MC._x){
  11.         _root.MC._x += 3;
  12.     }
  13.     if(_root._xmouse < _root.MC._x){
  14.         _root.MC._x -= 3;
  15.     }
  16. }
  17.  
  18. I am trying to achieve that when you release the mouse, the MC goes to the x position of your mouse. Sorry if I did something stupid, but I haven't worked with something like this in a while. I know that it won't stop once it reaches your mouse, too, and I don't really care. All I want to know is how I make this work... So, thanks a ton if you can help in advance. And thanks for trying even if you can't. And if not, it's fine. :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement