Creating a mask

advertisement
Introduction: Flash 8 Professional
Table of content
INTRODUCTION: ..................................................................... ERROR! BOOKMARK NOT DEFINED.
FLASH EDITOR........................................................................ ERROR! BOOKMARK NOT DEFINED.
CREATING A FRAME BY FRAME ANIMATION ........................ ERROR! BOOKMARK NOT DEFINED.
CREATING A SIMPLE TEXT MOVIE IN FLASH: ACTIVITY 1.............. ERROR! BOOKMARK NOT DEFINED.
CREATING A SIMPLE TEXT MOVIE IN FLASH ACTIVITY 2 ............... ERROR! BOOKMARK NOT DEFINED.
CREATING GRAPHICS USING THE TOOLBOX ....................... ERROR! BOOKMARK NOT DEFINED.
ACTIVITY PAINT FILLS ................................................................. ERROR! BOOKMARK NOT DEFINED.
DRAW AND MODIFY SHAPES ......................................................... ERROR! BOOKMARK NOT DEFINED.
TRANSFORM TOOL ........................................................................ ERROR! BOOKMARK NOT DEFINED.
CONNECTING OBJECTS WITH SNAP TO OBJECT .............................. ERROR! BOOKMARK NOT DEFINED.
ACTIVITY: USING THE PENCIL TOOL ............................................. ERROR! BOOKMARK NOT DEFINED.
ACTIVITY: USING THE SUB SELECTION TOOL AND THE SELECTION TOOL TO DELETE LINES IN A
DRAWING ...................................................................................... ERROR! BOOKMARK NOT DEFINED.
ACTIVITY: FUNNY FACE ANIMATION ............................................ ERROR! BOOKMARK NOT DEFINED.
FLASH ANIMATIONS ........................................................ ERROR! BOOKMARK NOT DEFINED.
ACTIVITY: AUTOMATED ROBOT ................................................... ERROR! BOOKMARK NOT DEFINED.
ACTIVITY: SHAPE TWEEN ............................................................. ERROR! BOOKMARK NOT DEFINED.
ACTIVITY: SHAPE TWEEN 2 .......................................................... ERROR! BOOKMARK NOT DEFINED.
PUT A STOP FUNCTION ON FRAME, WHERE YOU WANT IT STOP PLAYING ............................................... 2
CREATING BUTTONS............................................................................................................................. 1
MAKE AN ACTION THAT LOOPS PART OF YOUR MOVIE .......................................................................... 2
IMPORTING GRAPHICS INTO FLASH .................................... ERROR! BOOKMARK NOT DEFINED.
VECTOR GRAPHICS VERSUS RASTER GRAPHICS ........................... ERROR! BOOKMARK NOT DEFINED.
REASONS TO AVOID IMPORTING GRAPHICS ................................... ERROR! BOOKMARK NOT DEFINED.
ACTIVITY: IMPORT A RASTER GRAPHICS ...................................... ERROR! BOOKMARK NOT DEFINED.
OTHER FUNCTIONS ............................................................................................................................ 3
CREATING A CUSTOMISED CURSOR: ...................................................................................................... 3
CREATING A MASK: .............................................................................................................................. 3
IMPORTING SOUND ............................................................................................................................... 3
LINKING NON FLASH FILES IN FLASH 8 ................................................................................................. 3
OTHER INTERESTING THINGS: ............................................................................................................... 4
LEARN MORE: .......................................................................................................................................... 4
Introduction: Flash 8 Professional
Buttons
Buttons is usually used to navigate from one place to the next. We create the “image”
of the button, the way we want it to appear and then we put the code in to tell the
button what it should do when it is pressed.
Creating Buttons
1.
2.
3.
4.
Draw the shape that will become your button. It can be anything, but remember
people are “used” to buttons being rectangle. You can also use symbols that
people are used to for a specific reason. If you for example want to give
somebody the option of stopping an animation, I can create a stop sign which I
will use as the “stop” Button.
Use the selection tool to select the entire shape
Convert the shape to a symbol; Modify, Convert to symbol or press F8, or right
click convert to symbol
Name the symbol – make sure it is a meaningful name that when you see the
name that you know what it is; select Type Button, and click OK
Change the look of the different stages of a button: (Double click on the button
to see the 3 options)




5.
Up – how it looks normally, when your mouse is not over
it. This is usually your original button.
Over – how it looks when the mouse move over it
Down – how it looks when the mouse is pressed
Hit – the active area that will re-act when you mouse
move over it. If you have a difficult button or customised
mouse it might be a good idea to make the hit area a bit
bigger than the actual button.
Test your movie.
If you click on the blue arrow you will go back to the main screen.
Now that you have created the “look” of your button you need to put code in to make
it work.
Put code in the button to tell it what you expect to happen when you press the button
1. In the main view select only the button with the arrow tool
2. Click Actions- button Make sure it says Actions Button, if not you have not
only selected your button.
3. Select Global Function, Movie Clip Control, on (double click),
4. choose release from the pop-up menu
5. Global Functions, Timeline Control, gotoAndStop (frame you want to go to
and stop when the button is pressed)
Code looks as follows:
D:\533578152.doc
I Aldum
Page 1
Introduction: Flash 8 Professional
on (release) {
gotoAndStop(75);
}
or if you work with scenes you need to
specify the scene name in quotes
on (release) {
gotoAndPlay("Scene1",1);
}
Stop function
The stop function is used to stop Flash from automatically continue playing the Flash
movie. If we think of a web-page we would like Flash to continue displaying a
specific web-page until the user press a button, requesting your web-page to go some
where.
Put a stop function on frame, where you want it stop playing
1. Click on the frame where you want your Flash movie to stop playing, with
your arrow tool
2. Click on Action – frame, Global functions, action control,
3. double click on stop
4. An “a” appears on the frame you have put a stop on.
5. Save and test
Other global functions
There are other handy functions under your global functions as well, and if you think
about there names it will be easy to predict what they will do.
gotoAndPlay – will let you jump to another part in your Flash movie and the flash
movie will start playing at that specific point. This is often used when you want to replay an animation, or you want to go to a different place and play the movie further.
gotoAndStop – will let you jump to another part in your Flash movie without playing
the movie any further. This is often used with buttons moving to a different webpage.
StopAllSound – will stop playing all the sounds in your Flash movie.
Go to Help files to find out more about these functions if you need to use them.
D:\533578152.doc
I Aldum
Page 2
Introduction: Flash 8 Professional
Other functions
Creating a customised cursor:
1) Create a new layer, and call it cursor.
2) Draw your new cursor
3) Right click, click Convert to symbol, select MovieClip, give it a name and
press OK.
4) Double click on symbol (new cursor) with Selection tool. Click on stage.
5) Put the following code in the Action Movie Clip
Mouse.hide();
startDrag(this, true);
6) Test your customised button.
Creating a mask:
1) Create a new file
2) Create 2 layers,
a. first layer a picture you want to mask,
b. second layer the shape you want to mask, over the picture
c. You can create a Tween to show more of the picture
3) Right click on the second layer’s name, and select mask
4) Test your mask
Importing Sound
1) Import, Import to library
2) Insert a layer for your music you want to play
3) Insert a keyframe where you want your music to start, Properties, Sound,
choose your music that is in your library
4) Test your presentation.
Make an action that loops part of your movie
1.
2.
3.
4.
5.
6.
7.
8.
Create a new file, containing the word Welcome and convert it to a symbol,
MovieClip
Potion the movie clip instance of the left side of the screen in frame 1
Select only the movieClip “Welcome”, and double click
The timeline of the moveClip will open. Go to Frame 30 and put the MovieClip
of the screen on the right side.
Create a motion tween between frame 1 and 30
On frame 30 add the following Action:
Global Action, Timeline Control, gotoAndPlay(1)
Press the Blue arrow to go out of the “welcome” movie timeline.
Test your movie
D:\533578152.doc
I Aldum
Page 3
Introduction: Flash 8 Professional
9. On the welcome layer add a blank keyframe on frame 50
10. Create a new layer, on frame 60 add a circle
11. Add the following code on frame 60;
Global Action, Timeline Control, Stop
12. Test your movie
Can you explain what happened?
Linking non Flash files in Flash 8
1) The file must be an HTML file.
2) all your files must be in the same directory as your flash.swf
3) add the following code in the action of the button:
on (release) {
getURL("test2.htm", "_blank");
}
note:
test2.htm must be your file name.
_blank tells it to open it in a "blank" page.
Modular Website
If each part of your web-site is created on its own, it has the following advantages:
 The user does not need to download the whole big site
 You can make modular changes without affecting your web site
 Easier for more than one developer to work simultaneously on the same site.
 Make it easier to develop parts in more than one language, with only swapping
language specific portions, etc.
Other interesting things:
http://www.kirupa.com/developer/flash8/simple_animation.htm
http://www.flashkit.com/tutorials/Animation/more4.php
Learn more:
http://www.photoshopsupport.com/flash/tutorials.html
http://video-animation.com/flash8_001.shtml
http://www.kirupa.com/developer/flash8/simple_animation.htm
http://www.flashkit.com/tutorials/Animation/more4.php
Resources Used
1.
2.
3.
4.
CD from Dr. M Cooper
www.echoecho.com/flash/default.asp
www.echoecho.com/flashbuttons01.htm
Macro Media Flash 8 in 24 hours Philip Kerman
D:\533578152.doc
I Aldum
Page 4
Download