dionysus74075
Technical User
OK, I have a wheel with specific values I want users to be able to see when they rotate the wheel to a certain point... the problem is that right now when you go to press and drag the wheel (which is a mc called mcMain) it jumps to a certain point then you can drag normally and it works fine... ideas? I think I need to take a different approach.
mcMain.onPress = function() {
scrolling = true;
}
mcMain.onRelease = mcMain.onReleaseOutside=function () {
scrolling = false;
}
ab = _root.createEmptyMovieClip("temp", 1)
ab.onEnterFrame = function() {
if (scrolling) {
var dx = _xmouse-mcMain._x;
var dy = _ymouse-mcMain._y;
var rad = Math.atan2(dy, dx);
if (rad<0) {
rad += Math.PI*2;
}
angle = (rad*180)/Math.PI;
mcMain._rotation = angle;
}
}
mcMain.onPress = function() {
scrolling = true;
}
mcMain.onRelease = mcMain.onReleaseOutside=function () {
scrolling = false;
}
ab = _root.createEmptyMovieClip("temp", 1)
ab.onEnterFrame = function() {
if (scrolling) {
var dx = _xmouse-mcMain._x;
var dy = _ymouse-mcMain._y;
var rad = Math.atan2(dy, dx);
if (rad<0) {
rad += Math.PI*2;
}
angle = (rad*180)/Math.PI;
mcMain._rotation = angle;
}
}