Her

Home Flash & Swish Flash Tutorials MouseOver in ActionScript

MouseOver in ActionScript

Author: Selteco.com Author's URL: www.flashdesignerzone.com More by this author

This tutorial was written for the Flash Designer software, which allows you to create flash animations in a much easier way than by using Macromedia Flash. You may get Flash Designer here.

Create an object that appears when the user moves mouse cursor over some area.

1. Launch Flash Designer and choose "Blank Animation". Choose "Frame" > "Frame Size" to set movie dimensions. Enter 300 x 300 and click OK.

2. Choose "Rectangle" tool and draw 2 rectangles inside the frame. First rectangle will become active area, second rectangle will be hidden and appear on mouseover.

3. Make sure the second rectangle remains selected. Choose "Item" > "Line and Fill" > "Fill Color" and change the color to R:255 G:255 B:192, opacity to 80%. Click OK.

4. Choose "Edit" > "Convert to Sprite". You should see "Sprite3" as the name of the rectangle.

5. Choose "Item" > "Placement properties" and check "ActionScript" target. If necessary rename the sprite to Sprite3. Click OK.

6. Choose "Select" tool and select the first rectangle.

7. Choose "Item" > "Actions" > "OnOver", select "ActionScript" and enter the code:

Sprite3._visible = 1;

8. Choose "Item" > "Actions" > "OnOut", select "ActionScript" and enter the code:

Sprite3._visible = 0;

9. Sprite3 must be initially invisible. To hide it choose "Frame" > "ActionScript" and enter the code to execute on frame entry:

Sprite3._visible = 0;

10. Choose "Frame" > "Frame Delay" and check "Stop" options to create static frame. Click OK.

secret top high google rankings

11. Press F9 to play the file. Hit Esc to quit.

Double click "Sprite3" object and add text to the sprite with the text tool. To quit the sprite choose "Movie" > "Go to Main Thread"

Download source project t1025.zip (1 kb)