Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Macromedia Flash - Visual Effects Using Mouse Click: Hieu

Hieu is the focus of this article. In this article we will step by step learn how to create visual effects using mouse clicks.

Table of Contents

Understanding Hieu requires more than a headline. The overview below breaks down the key facts, changes, and user impact.

Hieu Overview

Step 1 First, save the image below

Macromedia Flash - Visual Effects Using Mouse Click: Hieu

Step 2 Create a new flash document. Press Ctrl + J key on the keyboard ( Document Properties ) and set your document width to 400 pixels and its length to 300 pixels. Choose white as the background color. Set the frame rate of Flash movie to 40 and click OK.

Macromedia Flash - Visual Effects Using Mouse Click: Hieu (2)

Step 3 Call the current image layer as image. Double-click on its default name (layer 1) to change the name. Press Enter when you have finished typing the new name. Step 4 Now select File > Import > Import to stage ( Ctrl + R ) and import the image you just saved in step 1. Step 5 While the image is still selected, press F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.

Macromedia Flash - Visual Effects Using Mouse Click: Hieu (3)

Step 6 Now go to Flash Library ( Ctrl + L ), right click on image_mc and select Linkage

Macromedia Flash - Visual Effects Using Mouse Click: Hieu (4)

Step 7 In the Linkage Properties window, select Export for ActionScript and in the Class section type CoolImage as shown below:

Macromedia Flash - Visual Effects Using Mouse Click: Hieu (5)

Now click OK, ignore the ActionScript Class Warning warning. Click OK. Step 8 Now select the image in the stage and press the delete key on the keyboard to delete it Step 9 Select the first frame and go to the Action Script Panel (F9). Then, find this code inside the actions frame:

Function Main () { stage. AddEventListener (MouseEvent. CLICK, AddImage); } Main (); function AddImage (e: MouseEvent): void { newImage var: CoolImage = new CoolImage (); this. AddChild (newImage); newImage. X = mouseX; newImage. Y = mouseY; newImage. ScaleX = 0; newImage. ScaleY = 0; newImage. Alpha = 0; newImage. AddEventListener (Event. ENTER_FRAME, ZoomImage); } function ZoomImage (e: Event): void { var imageMC: MovieClip = MovieClip (e. Target); imageMC. ScaleX + =.05; imageMC. ScaleY + =.05; if (imageMC. ScaleX <4) { imageMC. Alpha + =.05; } else { imageMC. Alpha - =.05; if (imageMC. Alpha <.8) { imageMC. RemoveEventListener (Event. ENTER_FRAME, ZoomImage); } } }

We are finished. Good luck!

FAQ

What is the main topic of Macromedia Flash - Visual Effects Using Mouse Click: Hieu?

Understanding Hieu requires more than a headline.

Why is Hieu important?

The overview below breaks down the key facts, changes, and user impact.

What should readers remember about Hieu?

Hieu Overview Step 1 First, save the image below Step 2 Create a new flash document.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.