welcome to my space

03/14/2010 (1:37 am)

Flash 8 Spining Wheel Infinate Menu

Filed under: nappedeptrole.com edit
  • Hi

    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


  • Yes you could make this stop at a particular degree in the rotation with the right math, unfortunately I don't know what that math would be. I do know that an easy way to do it would be with a tween class. You could stop it anywhere in the rotation you'd like with easing and it's much simpler to code than figuring out all the math. I use mc_tween2 which I think is an excellent class! I'll try and whip up a simple example without a tween class and you can check it out.


  • Actually if you change this....

    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.


  • Yes, you download the tween class here for free.

    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!


  • If your talking like a fan type of rotation you can make your movie clip and name it something....I'll use main for an example.

    main._rotation += 4;

    You could set that up so the rotation is true at all times except when you rollOver. Hope that helps.


  • Hi Junker,

    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


  • Thats Great! DO you know where i can find some more info on that class? your time is much appreicated. Many thanks

    Greg


  • Here is an example using the tween class I mentioned earlier. It would make your menu easy to code and rotate with ease to each of the six positions.

    http://www.junkerjorg.com/edits/MenuBar2.html


  • That would be incredibly useful many thanks.


  • Thats brilliant thanks, making some headway, now i just need the wheel to turn only one segment at a time. I'll upload it here


  • http://www.flashvault.net/tutorial.asp?ID=73

    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.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Flash 8 Spining Wheel Infinate Menu , Please add it free.