Macromedia Flash - Visual effects using mouse click
In this article we will step by step learn how to create visual effects using mouse clicks. You can use these effects for flash banners, for some presentations . Now we will start!
Step 1
First, save the image below
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 .
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.
Step 6
Now go to Flash Library ( Ctrl + L ), right click on image_mc and select Linkage
Step 7
In the Linkage Properties window, select Export for ActionScript and in the Class section type CoolImage as shown below:
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!
You should read it
- Fixing the Facebook error was renamed Vu Dinh Dung
- Model Inheritance là gì trong Django?
- Fix This app can't open in Windows 8
- Enhance Facebook account security in 5 steps
- Guide to receive skin Trieu Van Dung Si Long Lien Military Mobile
- Learn about BitTorrent
- Deploying Network Access Quarantine Control, Part 1
- Learn about the jusched.exe process
May be interested
- Macromedia Flash - Effects of changing position of textthis tutorial will show you how to create a constantly changing text effect in flash using the action script.
- Macromedia Flash - Effect of 'oil spill'through this tutorial you can make an effect for small ads that are quite simple but no less strange ...
- Macromedia Flash - Making fireworks effectsthis exercise is very simple, you will be guided on how to make a burst effect using a mask. no need to use action script code. to make this image more vivid, you can add sound effects! through this exercise, you'll know how to use the color mixer panel (shift + f9), how to convert the layer to a mask ...
- Macromedia Flash - Create analog clock in Flashthis tutorial will show you how to create a real working clock using flash effects.
- Macromedia Flash - The object moves with the mouse click positionwith this exercise, we will show you how to create an object that will move with the mouse click position using the action script.
- Macromedia Flash - Create flash menu with soundin this flash tutorial, we will guide you to create a dynamic flash menu with sound. you can use this menu on any website.
- Macromedia Flash - Create a snow effectthrough this tutorial, you will create a snow effect simply and quickly. you can use this effect on headers, banners on holidays or christmas cards ...
- Macromedia Flash - City photo zoom effectthis tutorial will show you how to enlarge any image with some flash tips. in this example, we will use a city photo, but you can use these same effects for any image. this article is completely
- Macromedia Flash - Complete Flash banner designin this article, we will show you how to create a complete flash banner without using the action script.
- Macromedia Flash - Water bubble effectcarefully watching this detailed tutorial will know how to create an extremely unique and funny effect with water bubble images using motion guide.