Skip to main content
Participant
April 19, 2006
Question

Movie Clip mouse drag at angle

  • April 19, 2006
  • 1 reply
  • 181 views
A have a working fader. I can make it move up and down and give a value 0 - 100. This works great. I would like to have it move not up and down but at about 30 degrees. I have tried using motion tweens but i think they only work when you're doing a pre made animation.
I can change the X and Y limits of the movement but what i want is this:
for every 3 px up move 1 px left, done in real time, or a wayt to attach a mouse controlled object to a motion path or guide.

Thanks for any input on this!

Cheers.
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 19, 2006
you can't use startDrag() unless the only constraints you want are (none or) a rectangular region. you can initiate a loop and direct any movieclip to adjust its _x, _y properties as a function of the mouse's _x and _y properites.

in your situation you must decide when to start the movieclip's movement (probably onPress) and when to terminate (maybe onRelease, but maybe also when the mouse moves some distance or greater from the movieclip) and the range of the movieclip's motion.