A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Mouseover Effect

  1. #1

    Mouseover Effect

    I am trying to get a star symbol to rotate 360 degrees on mouseover, but have no idea how to script that...or if there is an easy way to do it without actionscript. Any suggestions?

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    plymouth-uk
    Posts
    313
    the easiest way would be to create the star as its own MC(Movie Clip) and have it tween from say frame 1 to 10 rotating.

    but the best way is AS:

    create the Star and convert as a MC and name it star_mc, then asign it an instance of Star_MC as well.

    on the first frame place the as :

    Star_MC.onRollOver = function(){
    new mx.transitions.Tween(Star_MC,"_rotation",mx.transi tions.easing.Regular.easeInOut, 0, 360, 4,true);

    }

    this will then rotate 360 within 4 seconds.

    Hope this helps
    NOW! look whats happened! I told you to watch this space and now its gone.

  3. #3
    Thanks, that worked. I used that effect in my project, but I was also wondering if there was a way to get it to rotate in place? I looked at a tutorial about rotating in place but it was kind of confusing.

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    plymouth-uk
    Posts
    313
    make sure that the registration point of your star is in the center, this will enable it to rotate via the centre. Not sure post your Flas will have a look
    NOW! look whats happened! I told you to watch this space and now its gone.

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