mouseOver

  • rocketman
  • Born
  • Born
  • rocketman
  • Posts: 2

Post 3+ Months Ago

I would like to create a button in flash CS3 that when a mouse goes over it, it fades from black and white to the original colour. And when the mouse rolls out is slowly fades to black and white.

I have tried so many diffrent ways that I am now getting upset.

I would appreciate any help in this matter.

Cheers

Rocketman
  • solaris
  • Student
  • Student
  • User avatar
  • Posts: 83
  • Loc: NC

Post 3+ Months Ago

I'm not sure if this is going to answer your question, but here's how I generally get around the regular button mouse-over method.

First take your graphic (I'm assuming you can take your button and remove saturation to give the black and white effect). Convert the image to a movie-clip (not a button), and then go to editing mode for that clip. Make a motion tween (20+ frames) from the original image to the unsaturated one (or vice-versa, whatever effect you're attempting to make). (insert key-frame at frame 20, select frame one, add a filter >> saturation = 0). Then go back to your stage and apply this script (as 2.0) to your movie-clip.

Code: [ Select ]
 
onClipEvent (load) {
    roll = false;
}
onClipEvent (enterFrame) {
    if (roll == true) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
    //end if
}
on (rollOver) {
    roll = true;
}
on (rollOut) {
    roll = false;
}
 
  1.  
  2. onClipEvent (load) {
  3.     roll = false;
  4. }
  5. onClipEvent (enterFrame) {
  6.     if (roll == true) {
  7.         this.nextFrame();
  8.     } else {
  9.         this.prevFrame();
  10.     }
  11.     //end if
  12. }
  13. on (rollOver) {
  14.     roll = true;
  15. }
  16. on (rollOut) {
  17.     roll = false;
  18. }
  19.  


In this instance, roll is your variable and can be basically anything, as long as you change it where it's used. Basically controls the animation based on the value of the variable. This keeps the animation smooth and not "jumpy" as it would be if you used movie-clips with animation in a button instance.

Hope that helps.
  • rahan
  • Newbie
  • Newbie
  • rahan
  • Posts: 9

Post 3+ Months Ago

After developing a game by Flash and ActionScript, A sprite has a specific position. It takes that position in IE browser but problem in Mozilla, Opera. I have developed this game by ActionScript 2.0.It never problem for swf file but problem is for those browser only. Help me if any body know the solution.
  • ibrabdo
  • Novice
  • Novice
  • User avatar
  • Posts: 29

Post 3+ Months Ago

Inside the button in the over frame put a movieclip (which contain the animation u want) and in last frame inside the movieclip put the code stop(); and u will have the animation u need

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 3 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.