Follow the steps below:
- Launch Flash Designer and create a blank document.
- Set the frame delay to “Stop” (“Frame” > “Frame Delay”).
- Size the frame at about 300×300 (“Frame” > “Frame Size”).
- Draw 2 circles with the “Ellipse Tool”.
- Select both shapes (Ctrl+A). Choose “Item” > “Line Width” > “None”.
- choose “Edit” > “Convert to Sprite”. The object should appear as “Sprite3″
- Right-click it and click “Placement Properties”.
- Check the “Action-Script Target” checkbox and click OK.
Next, create 2 color buttons below “Sprite3″.:
- Choose “Rectangle” tool and draw a small rectangle (about 18 x 18 pixels, hold CTRL to draw both edges equal)
- Change fill color to purple
- Choose “Action” > “OnClick” and enter the following ActionScript code:myColor = new Color(Sprite3);
myColor.setRGB(0xff00ff); - Duplicate the rectangle with “Edit” > “Duplicate”
- Change fill color to green
- Choose “Action” > “OnClick” and modify the following ActionScript code:myColor = new Color(Sprite3);
myColor.setRGB(0x00ff00); - Hit F9 to play the file.
Download the source here




May 8, 2010 at 4:11 am
can i change event onclick to rollover?
I want to create map rollover and this example can help me
Thank a lot!