A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Rotating an image on mouse over

  1. #1
    Member
    Join Date
    Jan 2004
    Location
    South Carolina
    Posts
    42

    Rotating an image on mouse over

    I want to rotate an image of a volume knob to a text button when a user places his/her mouse over the text button. There are going to be about 4 text buttons surrounding the left side of the knob. I want the knob to rotate to whatever text button the user mouses over. How do I do it? I am a novice at this so I need the procedure to be in basic layman's terms! I've added an image so you can better understand what I mean. It's just an image... no attempt at making the .swf file.

    Thanks,

    Tom
    Attached Images Attached Images

  2. #2
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    Maybe something like this...

    myButton.onRollOver=function() {
    myImageMC._rotation=180;
    }
    myButton2.onRollOver=function() {
    myImageMC._rotation=170;
    }

    Just change the value for each button and play around with the rotation value until it rotates correctly to each button.

    Hope it helps
    NTD

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Why don't you offer him your own rotating buttons scripts, in your yesterday's thread?

  4. #4
    Member
    Join Date
    Jan 2004
    Location
    South Carolina
    Posts
    42
    Thanks, NTD....

    I'll try it and get back to you!

    Tom

  5. #5
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    O.N.
    It seemed more appropriate to show how the rotation property works instead of dropping a more complex function in, but by all means if you wish to show how to do it, be my guest.

    Math.sin and Math.cos

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Tgarber, just PMed you 2 tutorials links if need be...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center