TL;DR
You'll fade between stacked graphics as the mouse moves, with a bit of inertia. Each frame, mosx and mosy ease toward the mouse position by a fraction of the difference, and each graphic's _alpha is calculated from those values. The tutorial gives versions for both Flash 5 and Flash MX.
- Each graphic sits on its own layer as a movie clip with instance names graphic1, graphic2, and so on, at least 400 pixels wide and tall.
- mosx -= difx / 8; creates the inertia, and a higher number than 8 makes the effect slower.
- Formulas like 100 - (mosx / 4) - (mosy / 4) tie each graphic's transparency to the eased mouse position.
- Flash 5 uses onClipEvent on an empty clip, while Flash MX creates script_clip with createEmptyMovieClip and uses onEnterFrame.
This tutorial will work for Flash 5 and Flash MX! I will specify steps only used in Flash MX in blue and steps just for Flash 5 is red. The script to do this effect was very easy but took a lot of random creativity and I never would have been able to do this without the help of learning Flash through kirupa.com over the past year. Well its time to get rolling so I hope you like the tutorial!
|
|
[ move mouse over picture above to view ]
Alpha Graphic
Fade Tutorial Steps:
The following steps will help you to create the
effect you see above:
-
Project Layout:
Stage Size: 400 x 400
Stage Color: White (#FFFFFF)
Layers: 6 (Refer to pictures below for Layer names and Layer order)
Flash 5 Layer Order:

Flash MX Layer Order:
[ I used a folder to organize graphics in MX ]
-
Download the 400 x 400 graphics I used in my
file below or use your own, but make sure both
the height and width of your graphics are a
minimum of 400 pixels.
download tutorial graphics
- Now place images each in their own layers which you should have already made based on my image above in Step 1. Convert each graphic into a movie clip (name it anything) and give the graphic movie clip on the layer called 'g_clip1' an instance name of 'graphic1'. Repeat with 'g_clip2', 'g_clip3', 'g_clip4', and 'g_clip5' by giving them each an instance name of 'graphic' but make sure you add the graphic number at the end like we did with 'graphic1'.

[ This is what it should look like for the first one ]
-
Flash 5 Script (Skip
down to Flash MX for advance script):
Make an empty movie clip named 'script_clip' but you don't need to worry about giving this clip and instance name. Drag an instance of this movie clip onto the stage into the layer named 'Script Clip'. Open up the actions panel (F9) and select the empty movie clip we made to hold the script and copy/paste the text below in the box into your actions window:
Flash MX Script (Use script above for Flash 5):
Select the first frame of your 'Script Layer' and open up the Actions panel (F9) and paste this code into the panel:
- That is all that is to it, simple but fun! You can mess with all you want and if you get it to do anything cool e-mail me to have a look at it, I love to see what other people come up with! Below I will explain what the entire script does.
Actionscript Information:
|
|
This script can be changed in
many ways to do anything from rotation of the
images, the scale, or location! Just mess with
it and don't get stressed, have fun and if you
have any help or questions feel free to e-mail
me or you can always post in the forum which I
am a moderator for and always check on every now
and then.
|
|
telekinesis
(dan@danalu.com) danalu.com |
Before you go, here are a few things you can do:
-
Keep reading
Read the next article in the series, News Flasher, or check out some related content:
-
Ask a question
Stuck on something, or curious about a detail we skipped? Ask on the forums, and we’ll help you out.
Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence slop, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.
Your support keeps this site going! 😇

-
Hot off the Forums
:: Copyright © KIRUPA 2026 //--
