03/14/2010 (1:37 am)
Flash 8 Spining Wheel Infinate Menu
I am experimenting with creating a spining wheel that works in the same way as the infinate menu, but i have no idea how to get it to rotate around an axis rather than pan left or right or up and down. Could someone point me in the right direction please, either forum or tutorial.
Many thanks
Greg
ActionScript Code:
object.spin = 12 + Math.random()*20
to this
ActionScript Code:
object.spin = Math.round(45);
it will stop in the same place everytime. Which is just removing the random math. The 45 doesn't mean 45 degrees you can change it to 20 if you'd like and it will rotate less times.
http://hosted.zeh.com.br/mctween/
Here is your fla as well coded with the class so you'll have to download the tween class before it will work for you. Good luck, let me know if I can be of any other help!
main._rotation += 4;
You could set that up so the rotation is true at all times except when you rollOver. Hope that helps.
Almost, but i really want the wheel to be like a record player as it were, so the user could push it up or down with the mouse and select a menu item that way as it rotates, eases as you move the mouse closer to the center speeds up as it moves away.
Many Thanks
Greg
Greg
http://www.junkerjorg.com/edits/MenuBar2.html
So i have found this site thanks to you for pointing me in the "rotation" direction, now just some way to modify it for my needs. can i use this code to not just stop at "random , but to stop after say 45degrees?
Spin Button
on(press){
object.spinning = true
object.spin = 12 + Math.random()*20
object._rotation = object._rotation = 0
}
Main Object
onClipEvent(enterFrame){
if (spinning){
if (spin <= 0){
spinning = false
rot = (_rotation < 0) ? 180 + _rotation : _rotation
_root.youSpunA = Math.floor(16 * rot/180)+1
}else{
_rotation += spin -= .25
_parent.wheel._rotation = -_rotation
}
}
}
#If you have any other info about this subject , Please add it free.# |