Full Version: This is a shortened click by click version of a: Full Length Tutorial
Free
Flash Tutorial
The aim of this tutorial is to learn how to create some Matrix
special effects in Flash using simple ActionScript programming. There are two variations in this animation. Both take their inspiration from the films The Matrix & The Matrix Reloaded. The first is the dropping letters and the second has an added background. See the examples of these two Matrix Film animations below:
Create a new Movie Clip Symbol: Insert > New Symbol (Ctrl + F8)
Name the Movie Clip as: Characters
Click: OK
Select the Text Tool:
If the Property Inspector is closed, open it: Window Properties > Properties(Ctrl F3)
Select: Dynamic Text
Select a standard type face such as: Verdana
Set the Font size to: 12
Set the color to green: 00CC00
For style select: Bold
For paragraph style select: Align Centre
Type a single letter in the center of the Stage: A
In the Properties Inspector give the Text Box the Variable Name (Var): myLetter
Return to the Selection Tool:
If the Info Panel is closed, open it: Window > Info (Ctrl I)
With your Text Box still selected set the registration to: Center
Set the X & Y Both to Zero: 0
If the Timeline is not visible go
to: Window > Timeline (Ctrl+Alt+T)
In the Timeline select: Frame 1
If the Actions Panel is closed, open it: Window > Actions(F9)
If Script Assist is on, Switch it off:
Type (or copy & paste) the following actions:
x = random (255);
this.myLetter
= chr (x) ;
Step Three: Creating a Shining Background Sphere:
Create a new Movie Clip Symbol: Insert > New Symbol (Ctrl + F8)
Name the Movie Clip as: Sphere
Click: OK
Select the: Oval Tool
Draw a: Circle
Return to the standard Selection tool:
Select the outline of the circle and: Delete Stroke(outline)
In the Info Panel set both the width & height to: 25
In the Info Panel set the registration to: Center
Set the both X & Y co-ordinates to Zero: 0
In the Property Inspector set the circles fill and select a green: Gradient Fill
Step Four: Animating the Random Characters - Foreground
Create a new Movie Clip Symbol: Insert > New Symbol (Ctrl + F8)
Name the Movie Clip as: Animation
Click: OK
In the Timeline rename Layer 1 to: Characters
In the Timeline select: Frame 1
If the Actions Panel is closed, open it: Window > Actions(F9)
Type (or copy & paste) the following actions:
stop ();
In the Timeline insert a Blank Keyframe: Insert > Timeline > Blank Keyframe(F7)
If the Library Panel is closed, open it: Window > Library (F11)
Drag from the Library an instance of the Characters MC into Frame 2: Characters
If the Info Panel is closed, open it: Window > Info (Ctrl I)
With your Movie Clip still selected set the registration to: Center
Set the both X & Y co-ordinates to Zero: 0
If the Property Inspector is closed, open it: Window > Properties > Properties(Ctrl F3)
Set the Color Brightness to minus 50: Color > Brightness -50%.
With Frame 2 still selected go to: Insert > Timeline > Create Motion Tween
Select: Frame 4
Insert a Keyframe: Insert > Timeline > Keyframe(F6)
Set the Color Brightness to zero: Color > Brightness 0%.
Select: Frame 15
Insert a Keyframe: Insert > Timeline > Keyframe(F6)
Set the Color Brightness to minus 100: Color > Brightness -100%.
Step Five: Animating the Random Characters - Background
You should still be editing inside the Animation Movie Clip. You can check this by looking in the Edit Bar. It will say animation:
If your Edit Bar is not visible: Window > Toolbars > Edit Bar
In the Timeline lock the Character Layer:
In the Timeline insert a new layer: Insert Layer
Name the Layer: Sphere
Drag the Sphere layer under the original Character layer: Drag Layer to bottom
Select Frame 2 of the Sphere Layer: Insert > Timeline > Blank Keyframe(F7)
If the Library Panel is closed, open it: Window > Library (F11)
Drag from the Library an instance of the Sphere MC into Frame 2: Sphere
In the Property Inspector set the both X & Y co-ordinates to Zero: 0
With Frame 2 still selected go to: Insert > Timeline > Create Motion Tween
Reselect the Sphere by clicking on it: Select Sphere
Set the Color Brightness to minus 100: Color > Brightness -100%.
Select Frame 4 and go to: Insert > Timeline > Keyframe(F6)
Reselect the Sphere by clicking on it: Select Sphere
Set the Color Brightness to minus 50: Color > Brightness -50%.
Select Frame 15 and go to: Insert > Timeline > Keyframe(F6)
Reselect the Sphere by clicking on it: Select Sphere
Set the Color Brightness to minus 100: Color > Brightness -100%.
To test your Movie Clip, go to your Keyboard press: Enter
Step Six: Setting up the Main Stage
Return to the Main Stage by clicking on the Scene 1 Tab in
the Edit Bar:
If the Library Panel is closed, open it: Window > Library (F11)
Drag an instance of the Animation Movie Clip to the stage: Animation
In the Property Inspector give the Movie Clip an Instance Name: myCharacters
In the Timeline rename Layer 1 to: Animation MC
Select Frame number 3 in this layer and choose Insert > Frame (F5)
Step Seven: The ActionScript
Insert a new layer Insert > Timeline > Layer
Name the layer: Actions
Select Frame 1 of the: Actions Layer
If the Actions Panel is closed, open it: Window > Actions(F9)
Type (or copy & paste) the following actions:
var SSX = 30; var SSY = 30; var XSPACING = 20; var YSPACING = 20; var spans = new Array(SSX); for (y=0; y < SSY; y++) { for (x=0; x < SSY; x++) { var n = y * SSX + x; if ((((x*5 ^ y*3)) & 3) == 0) { duplicateMovieClip("myCharacters", "c"+n, n);
/* Only add the following code (by removing the "//") if you have created individual MCs for specific letters such as A, B, C & D etc. Note the first Instance Name would go in the line above instead of: myCharacters The rest of the go in the lines below.
Change my Instance Names to match yours. */
Insert a blank Keyframe: Insert > Timeline > Blank Keyframe(F7)
With Frame 2 still selected type (or copy & paste) the following actions:
for (x=0; x<SSX; x++) { if (spans(x)>=0) { n = spans[x]*SSX+x; this["c"+n].gotoAndPlay(2); if (spans[x]>=SSY) { n = Math.random()*SSY*8; n = int(n); spans[x] = -n; } } spans[x]++;
}
Select Frame 3 of the: Actions Layer
Insert a blank Keyframe: Insert > Timeline > Blank Keyframe(F7)
With Frame 3 still selected type (or copy & paste) the following actions:
gotoAndPlay(2);
Test your Movie: Control > Test Movie(Ctrl Enter)
Your Movie is done! For an explanation of the ActionScript see the full tutorial: Step Eight
I hope you have found this useful. If so perhaps you could recommend this site to others and link to webwasp!