How to make something bright in Flash when you mouse over it

Ever wanted to know how people are able to create those little Flash images that get brighter when you mouse over them? Well wonder no more! Follow these simple directions and you will be able to do it yourself.

Things You'll Need

  • Adobe/Macromedia Flash (I say Adobe because Adobe purchased Macromedia.)
  • An image file. PNG format is the best for working in Flash. (IMHO)
  • A little bit of time.
Show More

Instructions

    • 1

      First you will need to open Flash and start a new Flash document.

    • 2

      Press ctrl+r and import the image into flash.

    • 3

      After you have placed the item on the stage (the area that's not grey) press F8 and convert it to a Movie Clip.

    • 4

      Click on the Movie Clip and make sure that it's properties show up on the bottom of the screen. Change <instance name> to the name of the Movie Clip.

    • 5

      Change the color to alpha and set it to 50%.

    • 6

      Click on frame 1 of your bottom layer.

    • 7

      Click Actions above Properties.

    • 8

      Enter the following replacing <MC> with the name of your MC per instruction 4:

      //When moused over
      <MC>.onRollOver = function () {
      <MC>._alpha = 100;
      };
      <MC>.onRollOut = function () {
      <MC>._alpha = 50;
      };

    • 9

      Press ctrl+enter to test.

    • 10

      Sit back and bask in the genius that is you.

Tips & Warnings

  • When doing something like this remember it's OK to play around with the settings. If you want it to be darker to start then lower the alpha past 50!

Related Searches:

Comments

  • dsmflash Jul 16, 2007
    this code does not work

You May Also Like

Related Ads

Featured