flash mouse position instead of on release?
- Started
- Last post
- 4 Responses
- wwfc
Morning! Can anyone do me a favour and tell me how I can change this script to allow for the mouse position to replace the onrelease script?
This code is referring to two mc/buttons on the stage:
arrow_l.onRelease = function(){
rotateItems(-1);
}
arrow_r.onRelease = function(){
rotateItems(1);is it possible to replace the onrelease to recognise mouse x position?
- wwfc0
that code is part of this much longer script
http://ww.pastebin.com/m1334295
- powertoni0
heres the basic method:
myRadians = Math.atan2(_root._ymouse-this._y... _root._xmouse-this._x);
myDegrees = Math.round((myRadians*180/Math.P...myClip._rotation=myDegrees ;
- powertoni0
thats wierd...it abbreviated my script.
- wwfc0
Thanks for that powertoni ;-)
But I want the rotation of the carousel to follow the mouse movement/position not the entire physical moviclip. Thanks for th link though ;-)