Fading objects without using standard tweening

This tutorial with guide you through how to make an object in Flash fade without having to use multiple frames to tween.

Step 1

First of all we need to download and install an extension that we will be using for this tutorial. You can find the extension here. Get the latest version, at the time of writing it was 2.0.

Step 2

Open up the Macromedia Extension Manager and press the install button.

installbutton

Then navigate to the file you downloaded

installing

Press Install then Accept the licence agreement.

licence

Then the extension will be installed.

extensionmanager

If you had Flash open, restart it now for the extension to take effect.

Step 3

To use this extension in your Flash documents when using action script 2.0 you just need to add this line once to your actionscript in frame 1.

#include "lmc_tween.as"

If you are using action script 1.0 then you need to use this instead.

#include "lmc_tween_as1.as"

Step 4

First we need to put the object we wish to fade in to the document. This can be made in Flash or you can import it in to the document.

Put the object on to the frame. Then select it and press F8. This will bring up the convert to symbol screen:

converttosymbol

Now give it an instance name.

propertiesinstancename

Step 5

Deselect the object and insert this action script for the frame, make sure the object is not selected.

#include "lmc_tween.as" image._alpha = 0; image.tween("_alpha",100,speed,ease_type,1.1);

Now to explain what this code does.

#include "lmc_tween.as"

This includes the extension that we installed earlier.

image._alpha = 0;

This sets the initial alpha transparency for the object, in this case it is completely transparent.

image.tween("_alpha",100,speed,ease_type,1.1);

This makes the object completely opaque. The 100 defines the opacity of the object and the 1.1 defines the amount of time until the tween takes place.

To get better result you may want to set the fps to 30.