anyone got any ideas how to re-create the scroll wheel on the ipod?
i've tried to search the web to see if anyone's done it yet, but i couldn't find one.
i think the user would have to press down on the scroll area to make it work, but i rather it would work with a rollover.
anyone got any suggestions?
ipod scroll wheel
Started by darkson01, Mar 07 2007 03:46 PM
4 replies to this topic
#1
Posted 07 March 2007 - 03:46 PM
#2
Posted 07 March 2007 - 08:56 PM
get some fancy math 
I'd have to take a bit of time to figure it out, but it has something to do with the degree at which the mouse cursor is at. So you can do it on rollover....
This code gives me the degrees (nDeg)...
Use that as a starting point. Good luck.
Edit:
Forgot -- circ is a circle movieclip. You could replace the nCenterx and nCentery with static numbers too rather than needing a circle mc.
I'd have to take a bit of time to figure it out, but it has something to do with the degree at which the mouse cursor is at. So you can do it on rollover....
This code gives me the degrees (nDeg)...
circ.onRollOver = function(){
var xpos:Number;
var ypos:Number;
var nCenterx:Number = (this._width/2) + this._x;
var nCentery:Number = (this._height/2) + this._y;
var nDeg:Number;
this.onEnterFrame = function(){
xpos = this._parent._xmouse - nCenterx;
ypos = -1*(this._parent._ymouse - nCentery);
nDeg = Math.atan2(ypos,xpos);
nDeg = Math.round(nDeg/Math.PI*180);
trace(nDeg);
}
}
Use that as a starting point. Good luck.
Edit:
Forgot -- circ is a circle movieclip. You could replace the nCenterx and nCentery with static numbers too rather than needing a circle mc.
Edited by Pax, 07 March 2007 - 08:58 PM.
#3
Posted 08 March 2007 - 04:56 PM
im wanting it to not go from like 0 degrees to 360 degrees in the area of a semi circle. when it gets half way round the circle im wanting it to be at 180 degrees. this is what i've edited so far:
what would i do stop making it 360 to only half the circle and make it 359 degrees be just before the point which is set as 0 degrees?
circ.onRollOver = function() {
var xpos:Number;
var ypos:Number;
var nenterx:Number = this._x;
var nentery:Number = this._y;
var nDeg:Number;
this.onEnterFrame = function() {
xpos = this._parent._xmouse-nenterx;
ypos = -1*(this._parent._ymouse-nentery);
nDeg = Math.atan2(ypos, xpos);
nDeg = Math.round(nDeg/Math.PI*360);
trace(nDeg);
};
};
what would i do stop making it 360 to only half the circle and make it 359 degrees be just before the point which is set as 0 degrees?
#4
Posted 08 March 2007 - 08:28 PM
What a coincidence. I wrote one of these not too long ago.
http://www.bezzmedia.com/swfspot/samples/a...le_Wheel_Slider
This one works by incrementing/decrementing a number, but that number can be applied to a scroller.
http://www.bezzmedia.com/swfspot/samples/a...le_Wheel_Slider
This one works by incrementing/decrementing a number, but that number can be applied to a scroller.
#5
Posted 09 March 2007 - 12:02 PM
aww brillant!
thanks alot mate !
thanks alot mate !
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
