|
||||||
|
||||||
Tutorial: Creating Links within a Flash Movie
Free
Flash Tutorial
![]()
This tutorial is designed for people who have little or NO Experience of using Flash. The aim of the tutorial is to show you how to link one Flash 'page' with another 'page'. Page is in inverted commas because Flash does not really have pages but Frames, but the idea is the same. This tutorial explains how to link one part of a Flash Movie with next part of the Movie.
Note: Don't get Flash 'Frames' mixed up with HTML 'Frames'. They are completely different. Confused already? Well actually this is not difficult (hopefully)!
Cross Ref: If you wish to learn how to make a hyperlink, a link from a Flash Movie to a different web page, go to the tutorial: Hyperlinks
Click by Click: If you would like to view this tutorial without all the notes: Click by Click
My Example: Download
the Flash file Beg 004a
Click on
the triangle button.
See
Demo Movie of how to build this Flash file
Example of small Flash Movie with buttons linking one 'page' or Frame of the Flash Movie to the next.
Step
One: Setting up the Document
We are going to open a new Flash document and customise it.
Note: You should now have a new Flash document open.
Optional Extra: Close all the Panels except for: Timeline, Edit Bar and Tools. See: Workspace
The Movie is set to 200 x 130 pixels.
Selecting the Background colour.
Tip: It is better if you do not use spaces when typing your file name. Also do not use unusual characters. You should only use letters, numbers, _underscore or - hyphen only. Like this:
myFlashMovie01
my-Flash-Movie-01
my_Flash_Movie_01
Not: my Flash Movie 01
The reason that you do not use spaces is because Internet address never have spaces and so if you want to upload your work to the Net it is better to have the file name in the correct format from the start.
Step Two: Setting up Frame 1
Text goes inside a Text Box.
Note: It is possible for the Text Box to be smaller than the words that you type:
![]()
The Text Box is not wide enough so the words do not fit on a single line.
Tip: If the Text Box is too small stretch it by dragging the white square. You can also double click the white square:Note: You can only change the size of the Text Box whilst you are using the Text Tool:

Note: If you want to change the type settings the text must be selected. If you click on your text with the Selection Tool
the text will have a blue rectangle around it:

Important Note: If you take a different button from the Common Button Library avoid Knobs, Faders and Component buttons as they work differently.
Note: You can move the position of the Button and the Text by clicking on it with the Selection Tool
and dragging it
Step
Three: Setting up Frame 2





Note: Click on the Keyframe (back dot) in Frame 1 and you will see that the difference between the two Frames.
Frame 1.
Step Four: Setting up Frame 3
Note: You will now have black dots in Frames 1, 2 & 3:


Step Five: Testing the Movie
Note: Your Movie should be jumping from Frame to Frame non stop. You should be able to see a clear difference between all three Frames.
Note: This will only close the Test Window and not your file.
Step
Six: Stopping the Movie from Auto Playing
As you will have seen in the previous section, Flash automatically animates your Movie. That is it plays from Frame 1 to the last Frame and then returns to Frame 1 and plays again. This is the default for Flash but in this Movie we do not want it to animate. To stop the Movie from animating you will need to do some very simple programming! Welcome to ActionScript. ActionScript is the Language that Flash uses to program Movies. You are about to learn how easy it is to do some basic ActionScripting.


Cross Ref: The Actions Panel has two modes. Script Assist On and Script Assist Off. As a beginner it is much easier to work with Script Assist switched on. If you want to learn more about Script Assist see the tutorial on the Actions Panel
Important Note: The following instructions will not work unless Script Assist is on.
Script Assist is on if ticked in the Action Panel Menu:>
Note: A small a should appear above the black dot in Frame one. This indicates that the Keyframe has some Actionscript attached to it.
Note the little 'a' in Frame 1.

Step Seven: Attaching Actionscript to the First Button - Frame 1 Next ![]()
Now it is time to make the Buttons work. This is also done with ActionScript.
Note: When you click on the Keyframe (black dot) you will find that all the objects in that Frame are selected. In this case the objects are the text and the button. You know that objects are selected by the blue rectangles:
When attaching ActionScript to buttons it is important that only the button is selected otherwise the actions may get attached to the wrong object. Thus the first step is to de-select all the objects.
All the objects are now de-selected.
Only the Button is selected.
Important: If you have selected the button correctly the Actions Panel should say Actions - Button in the top left corner. In my experience beginners often make the error of attaching their ActionScript to the wrong object. Get into the habit of checking what the Actions Panel says in the top left corner:
![]()
Always Check what it says in the top left corner of the Actions Panel before applying Actions.Note: Script Assist should still be ticked:
>
on (release) {
gotoAndPlay(1);
}
This means that when the mouse button is released you will go to and Play Frame 1. You will need to make an adjustment so that the button takes you to Frame 2 and Stops.
![]()
The Button will now take you to Frame two and will Play.
Now you need to make sure the Movie does not animate by changing the Play to a Stop.
If you were to test the Movie this is what would happen:
Press the Button to test.
You will see that when pressed the Movie animates and returns all the way back to Frame 1 and stops.
Play means to animate so we need to get rid of the Play and replace it with a Stop.
This means that when the mouse button is released you will go to Frame 2 and Stop. Which is what is needed!
Click on your button. You should move to Frame 2 and Stop.
The buttons in Frame 2 will not work yet as you have yet to set the ActionScript for these.
Step Eight: Add the Actions to the Frame 2 Button - Next ![]()
This button takes you onto the next Frame which is Frame 3.
All the objects are now de-selected.
Only the Next Button is selected.
![]()
Check what it says in the top left corner of the Actions Panel: Actions - Button
This means that when the mouse button is released you will go to Frame 3 and Stop.
Step Nine: Add the Actions to the Frame 2 Button - Previous ![]()
This button takes you back to Frame 1.
All the objects are now de-selected.
Only the Previous Button is selected.
Check what it says in the top left corner of the Actions Panel: Actions - Button
The Actions should look like this:
on (release) {
gotoAndStop(1);
}
Step Ten: Add the Actions to the Frame 3 Button - Previous ![]()
This button takes you back to Frame 2.
Only the Previous Button is selected.
Check what it says in the top left corner of the Actions Panel: Actions - Button
The Actions should look like this:
on (release) {
gotoAndStop(2);
}
Step Eleven: Testing All the Buttons
Click on all your button. You should be able to move back and forth through all the Frames.
You should now be home and dry. Well done!
|
•
69618 visitors to this page since June 06 |
|
|
Webwasp is Phil Schulz's baby. You are welcome to contact me or become my Facebook friend:
Click here
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|