Alpha Fader for Flash MX 2004

Alpha Fader can be downloaded here >>

Example of Coded Example that took a couple of seconds to create!

One of the most common tasks done in Flash via ActionScript is the opacity fade, and when used cleverly can add a nice touch to your Flash projects.

I tend to use opacity fades quite a lot via ActionScript, and get pretty bored of typing in the names of Movie Clips, and adding the control code. Call me lazy? Nope, I just want to move on to bigger parts of a project, and those valuable seconds saved here and there really add up in the full run of a project.

I created this panel, to alleviate my pain, and it does quite a good job, simply select either a single or group of Movie Clips from the stage (doesn’t matter if they are named instances or not as the code will take care of unnamed instances), and play with the following parameters

Event Handler Checkboxes: The type of interaction with the Movie Clip
Start Opacity: The starting opacity for the effect
End Opacity: The ending opacity for the effect
Fade In Speed: Speed of fading in
Fade Out Speed: Speed of fading out

Once you are happy with your settings, clicking the ‘Generate Code’ button, copies the externalized .as file that we use to hold the Movie Clip prototype code into your working directory for the FLA that you are working with, and add the necessary code to the currently selected frame.

Using this methodology, and the extension, it took about 2-3 seconds to turn this lump of Movie Clips into nicely fading Movie Clips…

…removing the headache of adding this lump of code to the frame as its all done automatically.


#include "alpha.as"
Symbol3.onRollOver = function(){
this.alpha(5,100);
}
Symbol3.onRollOut = function(){
this.alpha(5,10);
}

Symbol6.onRollOver = function(){
this.alpha(5,100);
}
Symbol6.onRollOut = function(){
this.alpha(5,10);
}

Symbol9.onRollOver = function(){
this.alpha(5,100);
}
Symbol9.onRollOut = function(){
this.alpha(5,10);
}

Symbol12.onRollOver = function(){
this.alpha(5,100);
}
Symbol12.onRollOut = function(){
this.alpha(5,10);
}

Symbol2.onRollOver = function(){
this.alpha(5,100);
}
Symbol2.onRollOut = function(){
this.alpha(5,10);
}

Symbol5.onRollOver = function(){
this.alpha(5,100);
}
Symbol5.onRollOut = function(){
this.alpha(5,10);
}

Symbol8.onRollOver = function(){
this.alpha(5,100);
}
Symbol8.onRollOut = function(){
this.alpha(5,10);
}

Symbol11.onRollOver = function(){
this.alpha(5,100);
}
Symbol11.onRollOut = function(){
this.alpha(5,10);
}

Symbol10.onRollOver = function(){
this.alpha(5,100);
}
Symbol10.onRollOut = function(){
this.alpha(5,10);
}

Symbol7.onRollOver = function(){
this.alpha(5,100);
}
Symbol7.onRollOut = function(){
this.alpha(5,10);
}

Symbol4.onRollOver = function(){
this.alpha(5,100);
}
Symbol4.onRollOut = function(){
this.alpha(5,10);
}

Symbol1.onRollOver = function(){
this.alpha(5,100);
}
Symbol1.onRollOut = function(){
this.alpha(5,10);
}

Symbol3._alpha = 10;

Symbol6._alpha = 10;

Symbol9._alpha = 10;

Symbol12._alpha = 10;

Symbol2._alpha = 10;

Symbol5._alpha = 10;

Symbol8._alpha = 10;

Symbol11._alpha = 10;

Symbol10._alpha = 10;

Symbol7._alpha = 10;

Symbol4._alpha = 10;

Symbol1._alpha = 10;

Alpha Fader can be downloaded here >> , and I hope you find it useful!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • sajmom

    I’am noob, how i can install it ?

  • sgrosvenor

    If you have extension manager installed, simply download the mxp file, double click and install, then follow the on-screen instructions.

    If you don’t have Extension Manager installed, then download it here.

  • http://www.igeek.info asp_funda

    this is simply the best panel you have put up Steve, thanks!! :D

  • Thomas

    Hey, sweet extension. This is someting that I’ll start using in my projects for sure.

  • Raefer Gabriel

    I am getting a strange problem – this extension can’t seem to find the alpha.as file when it runs and throws a few error messages when I try to apply the effect (and of course doesn’t work when I try to preview the scene). I do see the ActionScript it generates applied to the first frame in my scene.

    I did a search of my harddrive for the alpha.as file and it is nowhere to be found. What am I missing here? Why isn’t the prototype code getting placed in the proper location? My installation seemed to go fine and I just tried reinstalling, didn’t make a difference.

  • sgrosvenor

    [QUOTE=Raefer Gabriel]
    I did a search of my harddrive for the alpha.as file and it is nowhere to be found. What am I missing here? Why isn’t the prototype code getting placed in the proper location? My installation seemed to go fine and I just tried reinstalling, didn’t make a difference.[/QUOTE]

    Can you tell me the following:

    (i) Operating System and Version
    (ii) Version of Flash MX / MX 2004 and Extension Manager Version

    Thanks

    Steven

  • Jake

    i’m having the same problem with the missing alpha.as file..

  • Kelly

    I am having exact same problems with others…. I get an error while it generates code. “While executing in lastfade.fla, the following JavaScript error(s) occurred: ReferenceError:FLfile is not defined” and there are no .as file has been generated but I can see generated action script for MC.

  • blurrgrl

    help sorry but the alphafader.mxp file wont even install! it says the installer file is invalid and that the extension wont be installed what is happening! pls help it looks like such a cool tool…

  • Jules

    You fullas prolly need to install v7.2 updater (Ellipsis)

    FLfile was not released until then.

  • aliasworkshop

    this is so infinitely sweet

  • Brett

    i’m having the same problem with the missing alpha.as file..

    I am runing on a Mac with Tiger. What can fix that issue ???

  • simongill

    Does this work for Flash Pro 8?

    I installed it, and it appears to create the code fine, and the .as file appears ok, but i get errors!

    **Error** Scene=Scene 1, layer=scripts, frame=1:Line 5: Left side of assignment operator must be variable or property.
    this-weeks-test-mc.onRollOver = function(){

    Theres about 6 errors in total, all similar to above.

    Im running windows xp, flash 8 professional, and extension manager 1.7.240.

  • yogesh

    I face same problem with fade effect. thos tool is not working proprly. it shwos error of “lapha.as” is missing.
    I feel when this tool is work proprly then thos is very special tool for me so please help me

    mail me on “thebestyogesh@gmail.com”