Flash Symbols: What Is A Flash Symbol?
Flash Symbols: What Is A Flash Symbol?
Flash Symbols: What Is A Flash Symbol?
A copy of a symbol used in the movie is called an Instance, which can have its own independent properties
(like color, size, function, etc.) different from the original symbol. All symbols used in a flash movie are stored
in the Library from where you can drag-and-drop new instances of the symbols into your movie. When a
symbol is edited all of its instances get updated, but changing the properties, effects or dimensions of an
instance of a symbol does not affect the original symbol or other instances.
Important Tip: Get used to using symbols in flash right from the beginning and name them neatly for easy
maintenance. It is a very tough job optimizing your file size if you don't use symbols from scratch!
Button symbols are used for timeline navigation - They add interactivity to the movie and respond to mouse
clicks, key press or rollovers/rollout, and other actions. You define the graphics associated with various
button states (Up/Over/Down/Hit), and then assign actions to the instance of a button. They have 4 frames in
their timeline - one each for the up, over and down states, and one to define the hit area of the button. Learn
how to create a button symbol.
Movieclip symbols are reusable pieces of flash animation - consisting of one or more graphic/button symbols
- thus they are flash movies within your flash movie. They have their own non-restricted Timeline (any
number of layers and frames - just like the main timeline) that plays independent of the main movie's
Timeline. The best thing about using movieclips is that you can control them from actionscript - you can
change their dimensions, position, color, alpha, and other properties and can even duplicate and delete
them. Learn how to create a movieclip symbol.
How to create simple flash animations using Motion,
Shape, Guided Tweening and Frame-by-frame
Animation
In Flash animation can be done in four basic ways:
• Motion Tween
• Shape Tween
• Frame-by-Frame Animation
(F8) by selecting the Graphic option and name the symbol say 'ball'.
2. Click the 20th frame in the Timeline and insert a frame (F5).
3. Now right-click the 20th frame in the Timeline and select Create Motion Tween (or Motion option
from the Tween panel of the Properties inspector) and insert a Key Frame (F6).
4. Select the 10th frame and insert a Key frame (F6) and move the ball to a different position say,
above the current position to create a motion sequence (automatically tweened by Flash).
5. Save your work and test the Movie (Ctrl + Enter). That's it you have created simple animation using
Motion Tween.
Note: Use the Color Panel of the Properties inspector to reduce the Alpha value from 100 to 32 for the 1st
and last frames to produce Simple Alpha Tweening as shown in the Example.
Properties inspector. Draw a vector using any of the drawing tools in Flash, say a small circle and
2. Click the 10th frame in the Timeline and insert a Key Frame (F6). Now draw another shape say a
3. Now right-click on any frame in between these two Key Frames and select Shape option from the
4. Save your work and test the Movie (Ctrl + Enter). That's it you have learnt how to create Shape
Tween in Flash.
Note: Only vectors can be Shape Tweened (Not for Symbols). Note both the Tweens have different colors
along the Timeline as shown above. Make sure that the line is smooth without being broken to ensure correct
Tweening.
C. Frame-by-Frame Animation
1. Create a vector/plain text using any of the drawing tools in Flash, say a text with 'Animation' typed
as shown in the example and break it using Break Apart (Ctrl + B) to separate the alphabets as
shown below:
2. In Frame-by-Frame animation we create the object for each frame so as to produce an animation
sequence.
3. Insert Keyframe (F6) and move the alphabets so as to produce an animation sequence.
4. Repeat the above step as far as desired to create Frame-by-Frame animation as shown in the
example.
5. Save your work and test the Movie (Ctrl + Enter). That's it you have created an animation using
Frame-by-Frame animation.
1. Create a vector/plain text using any of the drawing tools in Flash, say a text with 'Flash' typed and
break it using Break Apart (Ctrl + B) as done in the previous example and put each alphabet in
different layers and name the layers as shown in the picture below.
2. Insert a guide layer by right-clicking the topmost layer and select 'Add Guide Layer' (Insert--
>Timeline-->Motion Guide), draw any path using the pencil tool in the guide layer as shown in the
example.
3. Now create Motion tween by selecting the object in the 1st frame and snapping its registration point
4. Snap the object in the last frame to the other end of the path in the guide layer.
5. Repeat the same for all the objects (alphabets) by snapping their registration points to the path in
6. Save your work and test the Movie (Ctrl + Enter). That's it you have learnt how to create motion
1. You can place Movieclip instances inside the Timeline of a Button symbol to create Animated
advanced buttons.
2. Create a simple Button and enter into its symbol-editing mode. The second frame labeled Over
represents the button's appearance when the mouse pointer is over it.
3. Drag an instance of Movieclip 'movieclip_sym' from the Library (Ctrl + L) into this frame. Make sure
the text (if present) is always above the Movieclip used. This enables you to play the Movieclip every
Static Text
1. Drag a Textbox of Fixed-width on the stage using the Text tool and select Static Text Type from the
Properties window.
2. The Static textbox has a rectangular handle in the upper right corner, which can be used to adjust
3. The various Text properties such as the Font, Font-size, Font-style, Font-color, Align etc. can be set
4. Expanding-width textboxes can be created by selecting the Text tool and clicking once on the stage
without draging it, and start typing the text in it. Note that the expanding textboxes have a round
Input Text
1. Drag a Textbox on the stage using the Text tool and select Input Text Type from the Properties
window.
2. The Input textbox has a rectangular handle in the lower right corner, which can be used to adjust the
3. Apart from the normal Font properties of a Static textbox, the Input textbox has more options like,
Single Line to display the text as one line, Show Border Around Text to indicate the boundaries of the
4. A variable name can also be given which can be used to store user input.
Dynamic Text
1. Drag a Textbox on the stage using the Text tool and select Dynamic Text Type from the Properties
window.
2. The normal Font properties of a textbox can be set for a Dynamic textbox and it also has more
options like, variable names can be given, line options can be given say, Single Line to display the
3. Variable names are used to assign dynamic values at runtime or obtain values from External
Sources.
Top of Form
Bottom of Form
display four consecutive frames labeled Up, Over, Down, and Hit as shown below.
3. Import the sound file (Ctrl + R), add a new layer for sound and select the imported sound file from
4. Now insert frame (F5) for the Down frame and the Hit frame (this frame is not visible, but only
5. Save your work and test the Movie (Ctrl + Enter). That's it now your button can play music
6. duringmouse-overs
• Create a button and name this instance as Button then go to symbol-editing mode.
• Add new layer, draw the simple button and convert in to movie clip symbol (pressF8) then go to
• Press F6 or (right click >> insert key Frame) on 10th and 20th frame and then reduce that alpha
• Select middle of the frame between 1-10 then go to property panel, select shape tween from that
• Add new layer above the tweening layer then press F6 (right click >> insert key Frame) on 10th and
20th frame.
• Select 1st frame then go to action panel (press F9) stop this action, similarly do that process on 10th
• Go to button editing mode,add new layer, name this layer as text, and make sure that text layer
• Go to scene1, and select the button then press F9, copy and paste the following code.
on (rollOver)
_root.Button.instance1.gotoAndPlay (2);
} on (rollOut)
_root.Button.instance1.gotoAndPlay (11);
• Select text tool and write whatever you want, make sure that text should be static text.
• Press F6 (right click >> insert key Frame) then Select eraser tool, to write over the middle of that
text.
• Do the same process for every frame till your text is ended.
• Save your work and press Ctrl+Enter to view your flash movie.
• Go to Insert >> new symbol then create new graphic symbol “rec”.
• Add new layer above the text layer, and then drag “rec” from the library.
• Press F6 at 5th frame then go to property panel, reduce that alpha value to 0 , then select any frame
• Add next layer do that process 6 and 7, where that first tweening ended.
• Select all layers and apply the masking effect over that text.
• Save your work and press Ctrl+Enter to view your flash movie.
• Insert movie clip symbol “mc”, and then drag “gr” from library.
• Press F6 (right click >> insert key Frame) at 15th frame, then select free transform tool, to enlarge
“gr” horizontally. Select any frame between 1 to 15, right click >> createmotiontween.
• Do that same process, free transformation of “gr” may what effect you want that is, it may left to
• Go to scene 1, drag “mc” from library, and make sure “mc” is underneath of text layer.
• Select the text layer and then apply the masking effect.
• Save your work and press Ctrl+Enter to view your flash movie.
• Select text tool then write any text what you want.
• Copy that text, and insert new layer name as “shadow” then paste it, go to modify >> transform >>
flip vertical, then drag that text under the original text, change the color in to gray.
• Select the text and press Ctrl+B, similarly do the same process in shadow text also.
• Select frame between 1-10 then press F6 or (right click >> insert key Frame) on both layers.
select a Text Tool(T), write a letter say 'A', and press (Ctrl+B) to break the text.
• Go to the 10th frame in the 'Text' layer, press F7 or (right click >> Insert Blank Key frame). Now we
are in the 10th frame of the 'Text' layer and write another letter (as you like) we have written 'T', again
• Select any frame in between frame 1 - frame 10 of the 'Text' layer, then go to Properties Panel,
• Place the hint (red color circle) where you want regarding how you change the shape over another
text.
In Flash you can hide the standard cursor (Mouse pointer icon) and create custom cursors. The Mouse object
in Flash has a hide method which can be used to hide the normal mouse pointer and then we can define a
Movieclip as our custom
The instance name of a symbol is used to control it using Actionscript commands (Refer to Flash
The 'hide' method of the predefined object 'Mouse' is used to hide the standard cursor. The keyword
'this' is used to reference the Movieclip instance 'cust_cursor'.
3. We use the 'startDrag' action of the Movieclip to use the movieclip as a custom cursor.
4. The Custom Cursor Movieclip can also be Animated and used as a Mask as shown in the example
below.
5. Save your work and test the Movie (Ctrl + Enter). That's it you have learnt how to create a movieclip
Top of Form
2. Create a Dynamic Textbox and select 'Render text as HTML" from the Properties inspector, don't
3. To format the text in Bold/Italics, open Actions window (F9) and type the following code:
dyn_txt = "<b>This text is in Bold</b><br>";
dyn_txt = "<i>This text is in Italics</i>";
4. Values can also be concatenated using '+' sign. Other HTML tags for Fonts can also be used with
Introduction
While working in Flash with sound/music files you will find it really necessary to use a sound on/off button as
an option. We have endeavored to make the actionscripting used in this tutorial as basic & minimal as
possible. Happy Learning!
Please take a look at the demo above. This demo is a simple play/stop button for you to control the sound
files in your Flash project. Usually you will need to have the music playing and have a stop button displayed
first. Since it is easier to understand how a play and then stop button works we have used this example first.
Once this is done we will also teach you how to start with the sound playing and the stop button displayed.
• Create two buttons that are sort of similar and represent sound on and off. For example you can
• Import your sound file into your movie: Press (Ctrl+R) to get the Import screen, now browse to
• Open your Library panel (Ctrl+L), locate and right click on your sound file. From the list select
Linkage... the linkage properties form will pop-up. In the identifier text box enter mix1 and tick the
"Export for Actionscript" and "Export in first frame" options under Linkage.
What this Does: You are giving the sound file in the library an identifier without it actually being used
in the movie timeline. This enables it to be called and used by ActionScript code.
• In your movie timeline, create 3 consecutive key frames. Place your Play button in the second frame
and label it as play and your Stop button in the third frame and label it as stop (The frame label is
specified in the properties window). They should both be in the same position for them to look like a
• Click the first key frame and copy-paste the following actionscript into the actions panel.
my_sound.attachSound("mix1");
play();
What this Does: You are creating an instance of the Sound Class whose source is mix1 (the identifier in
• Click the 2nd and 3rd frames and give the stop() action.
• Select the play button in the 2nd frame and copy-paste the following actionscript code into the
actions panel.
on (release) {
_root.my_sound.start(0,1000);
_root.gotoAndStop("stop");
}
What this Does: On clicking your play button, you are telling your sound instance to start playing and
the timeline to go and display the stop button in the "stop" frame. The optional parameters (0,1000) for
the start function are given for looping of the sound or music file. This specifies that the sound file
starts playing at 0 milliseconds and is looped 1000 times (any number value depending on the duration
• Select the stop button in the 3rd frame and copy-paste the following actionscript code into the
actions panel.
on (release) {
_root.my_sound.stop();
_root.gotoAndStop("play");
What this Does: On clicking your stop button, You are telling your sound instance to stop playing and the
Cool Tip: You can use these buttons even within a movie clip as the sound instance is initiated in the main
timeline.
• Click the first frame and in the actions panel place the following actionscript code:
my_sound.start(0,1000);
gotoAndStop("stop");
my_sound.attachSound("mix1");
my_sound.start(0,1000);
gotoAndStop("stop");
Flash Preloader
1. Preloader Frames: First you will have to create your preloader frames.
• Make two layers called preloader and actions. Go to the first frame in the preloader layer and place a
• Double click the same frame and in the frame actions tab give the following action script:
ifFrameLoaded ("end") {
gotoAndPlay ("start");
FLASH 4
If Frame Is Loaded ("end")
Logic: This actionscript checks if the last frame of your movie (labeled "end") is loaded and then only
starts playing your flash file at the starting frame labeled "start". Thus this action script decides
whether to continue the preloader loop or to break free and start playing the movie.
2. Preloader Loop: Now we need to make a loop that executes till the last frame is loaded. To make use of a
very basic animation we will display three dots after the loading text to show that loading is taking place. To
do this insert three key frames after the first frame in the actions layer. Now place one dot, two dots and
• Now we need a frame to return to the first frame as the condition is being checked there. For this
double click the fifth frame in the actions layer and give the following action script.
gotoAndPlay (1);
Logic: We just return the control to the first frame to complete a loop.
• Now click on the sixth frame in the Preloader layer and give it the label start. That's it your simple
preloader is ready. Just make sure that all the stuff that you want to be displayed in your movie
starts from the 6th frame and that you label the last frame of your completed movie as "end".
Alternatively for Flash 5 and above you can use the following code instead of the code given in the
first frame:
ifFrameLoaded (_totalframes) {
gotoAndPlay ("start");
Here, we have just replace the "end" frame with the inbuilt variable _totalframes which contains the
• We recommend you create an attractive movie clip and place it in frame 1 to make your preloader
look more interesting then the plain loading text used here :-)
Test your movie for a 64KB modem by pressing Ctrl+Enter twice. You will be able to see how the preloader
progresses and then starts playing at frame "start".
That's it, your simple Flash preloader is ready! Now continue with the rest of your animation.
varies depending on the source file/user input and hence may require the use of scrollers.
2. Create a Dynamic textbox with Multiline property selected using the Properties panel, name the
3. Create 2 buttons for Upward and Downward scrolling and write the following Actionscript code:
Upward Button
on(press)
{
scrtxt.scroll=scrtxt.scroll-1;
}
Downward Button
on(press)
{
scrtxt.scroll=scrtxt.scroll+1;
}
4. Save your work and test the Movie (Ctrl + Enter). That's it you have learnt how to create simple
Top of Form
• Create two layers name the layers as 'image' and 'outline' respectively in your timeline.
• Now click on the 'outline' layer and move the 'outline' layer above the 'image' layer and using Pen
icon, draw the outline over the image as you see in the above flash movie. Make sure you have drawn
• Double click on the 'line_mc' movie clip. Now the 'line_mc' movie clip will open in new symbol editing
mode. Select the outline from the 'outline' layer, then goto (Modify>>Shape>>Convert Lines to Fills).
• Insert a new layer in the 'line_mc' movie clip, change the name of the layer2 into 'Mask'. Make sure
• Press F6 or (right click>>Insert Keyframe) in the 20th frame in the mask layer.
• In the 'mask' layer, click on the 20th frame and select the linear rectangle. Now move the rectangle
from downwards to upwards (shift+up arrow). Click on any frame in-between 1-20 then go to the
Properties Panel and select Tweening combo box and select Shape.
• Select the 'outline' layer, right-click on it and select 'Mask' from the context menu to convert it into a
mask layer.
• Save and test the movie press (Ctrl+Enter). Now you have made a flash movie where lines running
• Open the new flash document and set the dimensions for your background.
• Create three layers in the layers panel name it as 'bg' layer, 'sine wave' layer and 'text' layer.
• Select the 1st frame in 'bg' layer, draw the background using rectangle tool, either is a gradient fill
or solid fill.
• Select 1st frame in the 'sine wave' layer, draw the sine wave using the pen tool.
• Select 1st frame in the 'text' layer, import the image or write a text using text tool.
• Go to the 'sine wave' layer select a sine wave, and convert the sine wave in to a movie clip
symbol
• Double click that movie clip symbol, press F6 in the 10th frame, Then go to
(Modify>>Transform>>Flip Vertical), then select any frame between 1-10th frame, go to the Properties
• Go to scene1 copy the movie clip three times and arrange the move clip one after another, select
the entire movie clip and convert all movie clip symbol in to single movie clip 'mc'. Now double click
that 'mc' move clip and select all 'smc' movie clip then distribute all movie clips into different layers.
• Go to first layer, press F6 (right click >>Insert Keyframe) in the 10 th frame, to move the 'smc', then
go to frame between 1 -10, (right click>> Create Motion... ) from popup menu. Do the same process in
2. Create a vector using any of the tools in Flash, say a rectangle tool to draw a bar as shown below:
3. Open Color Mixer Panel and select Bitmap option which opens up the Browse pop-up window, now
4. Use the Bucket tool to fill the object with the selected bitmap.
5. Likewise any number of bitmaps can be imported to the Library and used as bitmap fills, just by
6. That's it you have learnt how to use Bitmap images to create graphics with attractive fills in Flash.
1. You will see 2 colors at the 2 extreme points, now to convert your circle into a similar Ring, make
2. In a similar manner you can add any number of colors at different points to create different effects,
3. Save your work and try out various other effects in a similar manner to produce really cool and
1. Create a Movieclip (Refer the Flash Photo Masking tutorial for this example) with some animation
2. Create a Button for Start and Stop action of the movieclip and name them as 'start_btn' and
'stop_btn' respectively.
3. Write the following Actionscript code for the 2 Buttons as given below:
Start Button
on(press)
{
mask_mc.play();
}
Stop Button
on(press)
{
mask_mc.stop();
}
4. Save your work and test the Movie (Ctrl + Enter). Thats it you have learnt how to control movieclips
2. Create three Dynamic Textboxes for displaying the hours, minutes, seconds and name their variables
3. Write the following Actionscript code in the Actions window (F9) as given below:
var dt, timeint;
dt = new Date();
ch = dt.getHours();
cm = dt.getMinutes();
cs = dt.getSeconds();
timeint=setInterval(timer,1000);
function timer() {
dt = new Date();
ch = dt.getHours();
cm = dt.getMinutes();
cs = dt.getSeconds();
}
4. Variables dt, timeint Flash are first declared using the keyword 'var' and any function can be defined
by using the keyword 'function' followed by a function-name and the function code which can be
5. The constructor new Date() is used create an instance of the Date object and assigned to the
variable 'dt'.
6. The methods getHours, getMinutes, getSeconds of the Date object are used to retrieve the hours,
7. Save your work and test the Movie (Ctrl + Enter). That's it you have learnt how to create scrolling
Top of Form
Bottom of Form