Flash Tutorial For Starters

109

Introduction

In 1997, Macromedia acquired the small company that developed FutureSplash as a way to complement Director, its flagship product. Director, which has been around longer than the Web, is a highly scriptable program built to create interactive presentations and games.

Chances are your favorite CD-ROM game was created with it. Toward the end of 1995, when Netscape Navigator 2 was the latest, greatest browser, Macromedia introduced Shockwave as a way to port Director movies to the Web.

Users downloaded and installed a free plug-in, and the movies played right there in the browser. That was — and is — pretty great. But since Director didn’t start with the Web in mind, most Director movies tend to be big bandwidth hogs, and they do much, much more than what’s necessary for the Web. On the other hand, there has been a growing need to create an alternative to standard GIFs and JPEGs, which lack versatility and can result in big files.

By the end of the 3rd quarter of 1998, less than 40% of all surfers were able to view Flash movies right away. A year later the percentage was 90% – and today Flash is a state-of-the-art method for vector graphics on the web.

And The Rest is History…

History of Flash

1984 – The firm MacroMind is found in Chicago. Merging of MacroMind and Authorware to Macromedia

1995 – Macromedia takes over Altsys (inventor of FreeHand) FutureWave develops simple vector-based illustration program: SmartSketch FutureWave presents the plugin Future-Splash-Player for SmartSketch

1996 – The animation program Cel-Animator is created by FutureWave In July renamed into FutureSplash-Animator Macromedia takes FutureWave over FutureSplash-Animator and Future-Splash-Player from now on known as Flash and Shockwave Flash

1997 – Flash 1 and shortly afterwards Flash 2 were published.

1998 – Java Player produced for Shockwave Flash-movies in the Flash 2 Flash 3 is published.

1999 – The next new version Flash 4 is available

2000 – Latest version of Flash – Flash 5

Characteristics and Advantages of using Flash:

HTML is ideal for creating static websites where text and images are placed at fixed positions. But it doesn’t really support dynamic sites, where text, images, and animations are moving around on the screen. Traditionally, these effects were achieved with animated GIF images or java applets.

Before we going to explore the Flash, we will compare Flash to both animated GIFs and java applets.

An animated GIF is actually many images saved in one. When the animated GIF is loaded onto a webpage, the browser simply loops the images. This means, if you make an animation of a clown that moves his hand up and down in 25 small movements, then the clown is saved 25 times. The animated version of the clown becomes 25 times bigger than a regular clown image. Therefore, even small animations take forever to load.

While animated GIFs can be used for animations, they do not support interactivity. They simply loop images in a predefined order and that’s it. In Flash, you can control the animations. For example, you can make the animation stop and wait for the user to click a button. And when the animation starts again it can be dependant on which button was clicked.

So compared to animated GIFs, the advantages of Flash are that: Flash movies load much faster. Flash movies allow interactivity.

Flash movies are in many ways similar to java applets. Small programs that can be embedded into your HTML pages. But unlike java applets, it is fairly easy to create animations in Flash without programming skills. Flash movies are more stable in web browsers than java applets.

Let The Games Begin…

Flash is both a drawing tool and a movie editor. If you’ve used other graphics applications, some of the tools may look familiar, but some won’t. To keep things simple, let’s start with a little introduction to the interface before diving right in to the nuts and bolts.

The drawing tools in Flash let you create and modify shapes for the artwork in your movies. For an interactive introduction to drawing in Flash, choose Help > Lessons > Drawing in your Flash program. The tools for painting are kept in the “Tools” bar, usually positioned at the left top of your Flash Screen.

This is the main area where you will find all your image editing tools.

On the following pages we will guide you through the use of each of these tools, starting with the simplest.

But before going through the different tools, we will look at the way Flash handle drawings. The most important thing to understand is the distinction between outlines and fills. When you draw a line there is no fill – only the outline. When you draw a rectangle (or a circle) you actually draw two things: The outline (border) and the fill. Unlike most other programs, Flash doesn’t automatically combine these two into one object.

Pencil Tool:

The Pencil tool is used in much the same way that you would use a real pencil to draw. Simply select the tool and drag on the Stage to draw with the Pencil tool.

SHIFT key : Constrain directions You can press the Shift key while dragging to constrain lines to vertical or horizontal directions.

Colors

You can specify the color with the Stroke Color Tool.

Smoothing and Straightening

Stroke panel : Window > Panels > Stroke
Finally, you can specify line style (solid, dotted etc.), line width in pixels and color using the Stroke panel.

Line Tool:

The Line tool is used in much the same way that you would use a real pencil to draw with a ruler. Simply select the tool and drag on the Stage to draw a straight line between the start and end points.

SHIFT key : Constrain angles

You can press the Shift key while dragging to constrain possible angles for the line. By default this will only allow for lines that are either horizontal, vertical or 45 degrees between.

Colors

You can specify the color with the Stroke Color Tool.

Curving You can turn a straight line into a curve with the Arrow tool

  1. Make sure the line is not selected (you can do this by clicking somewhere on an empty spot on the stage).
  2. Select the Arrow tool.
  3. Click on the line, and while holding down the mouse button, drag the curve.
  4. Release the mouse button and your curve is finished

Curving Lines and Edges:

Moving

You can move a line with the mouse, quite similar to how you’d turn it into a curve or you can move it with the arrow keys.

  1. Select the Arrow tool.
  2. Make sure the line is selected (you can do this by clicking once on the line then release the mouse button).
  3. Click on the line, and while holding down the mouse button, move it to the new position.
  4. Press the arrow keys on your keyboard to move the line.

Precise Size and Positioning

You can position the line perfectly by using the info panel.

The “square” connected to the line where it says “Click this square” is used to set the origin for coordinates – either at top left or center of the stage.
Fields for X and Y are used to enter the position of the selected object.
Fields for W and H are used to enter the width and height of the selected object.
When working with lines, one might think that height would be 1 for a thin line.
However, width and height refers to the square between the start and end points of the selected object.

A horizontal line that is 100 pixels wide and 1 pixel high spans a square of 100 x 1 pixels. A similar line would span a square of 100 x 100 pixels if it was turned 45 degrees.

Oval Tool

The Oval tool is used to make circular objects. Simply select the tool and drag on the Stage to draw a circle that spans between the start and end points.

SHIFT key : Round Circles

You can press the Shift key while dragging to ensure your circle is perfectly round.

Colors

You can specify the colors with the Stroke and Fill Color Tools.

Ctrl+G : Grouping Outline with Fill

When you draw a circle, Flash actually creates two objects: the fill and the outline. This may cause problems if you try to move your circle to a new position, because if you fail to select both objects, only the one selected will be moved. To avoid this it’s often a good idea to “group” the outline with the fill, thus locking them together as if it was a single object

  1. Make sure both the fill and the outline is selected. (You can do this in two ways:a. Select the Arrow tool in the toolbox, and while holding down the SHIFT key click on both the fill and the outline.b. Select the Arrow tool in the toolbox, and drag a rectangle outside your circle)
  2. Press Ctrl+G to group the selected objects. (If at a later point you want to “break” apart the grouped objects, you can do it by selecting the grouped object then pressing Ctrl+B).

Precise Size and Positioning

You can position the oval perfectly using the info panel.

Info Panel : Window > Panels > Info

The “square” connected to the line where it says “Click this square” is used to set the origin for coordinates – either at top left or center of the stage.

Fields for X and Y are used to enter the position of the selected object. Fields for W and H are used to enter the width and height of the selected object.

Rectangle Tool

The Rectangle tool is used to make rectangular objects. Simply select the tool and drag on the Stage to draw a rectangle that spans between the start and end points.

SHIFT key : Proportioned Squares

You can press the Shift key while dragging to constrain proportions for the rectangle, to ensure your rectangle is a perfect square.

Colors

You can specify the colors with the Stroke and Fill Color Tools.

Rounded Corners

You can specify the rounding of the corners with the “Round Rectangle Options” at the bottom of the toolbox.

Ctrl+G : Grouping Outline with Fill

When you draw a rectangle, Flash actually creates two objects: the fill and the outline. This may cause problems if you want to move your rectangle to a new position, because if you fail to select both objects, only the one selected will be moved.

To avoid this it’s often a good idea to “group” the outline with the fill, thus locking them together as if they were a single object.

  1. Make sure both the fill and the outline are selected. (You can do this in two ways:a. Select the Arrow tool in the toolbox, and while holding down the SHIFT key click on both the fill and the outline.b. Select the Arrow tool in the toolbox, and drag a rectangle outside your rectangle)
  2. Press Ctrl+G to group the selected objects. (If at a later point you want to “break” apart the grouped objects, you can do it by selecting the grouped object then pressing Ctrl+B).

Skewing

Before skewing a rectangle make sure it has been grouped. You can skew the rectangle in two ways.

To skew an object by dragging:

  1. Select the object with the Arrow tool.
  2. Click the Rotate button in the toolbox options.
  3. Drag one of the centered handles.

To skew an object using the Transform panel:

  1. Select the object.
  2. Choose Window > Panels> Transform.
  3. Click Skew.
  4. Enter angles for the horizontal and vertical values

Precise size and positioning

You can position the Rectangle perfectly using the info panel. Info Panel :

Window > Panels > Info

The “square” connected to the line where it says “Click this square” is used to set the origin for coordinates either at top left or center of the stage.

Fields for X and Y are used to enter the position of the selected object.
Fields for W and H are used to enter the width and height of the selected object.

Eraser Tool:

The Erase tool works similar to a classic eraser. Simply select the tool and drag on the Stage to erase things.

Double-click Eraser Tool:

Erase All You can double click the Eraser tool to delete everything on the stage. (If you happen to do this by mistake you can always click Ctrl+Z to undo).

Using the Eraser Mode Option

In the options listed at the bottom of the toolbox you can specify the Eraser Mode:

  • Erase Normal – erases strokes and fills on the same layer.
  • Erase Fills – erases only fills; strokes are not affected.
  • Erase Lines – erases only strokes; fills are not affected.
  • Erase Selected Fills – erases only the currently selected fills and does not affect strokes, selected or not. (Select the fills you want to erase before using the Eraser tool in this mode.)
  • Erase Inside – erases only the fill on which you begin the eraser stroke. If you begin erasing from an empty point, nothing will be erased. Strokes are unaffected by the eraser in this mode.

Using the Faucet Option

To remove stroke segments or filled areas:

  1. Select the Eraser tool and then click the Faucet modifier.
  2. Click the stroke segment or filled area that you want to delete.

Using the Eraser Shape Option

In the options listed at the bottom of the toolbox there is a drop down that lets you specify the Eraser shape and size. Use this option to customize the size and look of the eraser.

Alternative ways to delete things

There are other ways to delete things besides using the Eraser tool. The most common way is to select one or more objects and then press the DEL key on the keyboard. You can delete an entire layer by clicking the layer at the top of your screen and dragging it to the Trash bin. You can delete several frames at once by selecting the frames (and layers) in the timeline, then right click and choose “cut frames”.

Ink Bottle Tool:

The Ink Bottle tool lets you change the stroke color, line width, and style of lines or shape outlines.

Using the Ink Bottle tool, rather than selecting individual lines and objects, makes it easier to change the stroke attributes of multiple objects at one time.

To use the Ink Bottle tool:

  1. Select the Ink Bottle tool.
  2. Choose a stroke color as described in Using the Stroke and Fill controls in the toolbox.

Color Tools:

3.    Choose line style and line width from the Stroke panel.

Stroke Panel:

Window > Panels > Stroke

4.  Click an object on the Stage to apply the stroke modifications.

Applying outlines to existing objects:

You can use the stroke tool to apply outlines even for things that were initially made without outlines.
For example, if you initially created a rectangle with no outline, then later decided you wanted an outline, simply use the Ink Bottle tool as described above and a new outline will be applied.

Paint Bucket Tool

Paint Bucket Tool The Paint Bucket tool fills enclosed areas with color. It can both fill empty areas and change the color of already painted areas. You can paint with solid colors, gradient fills, and bitmap fills.

You can also use the Paint Bucket tool to adjust the size, direction, and center of gradient and bitmap fills.

To use the Paint Bucket tool to fill an area:

  1. Select the Paint Bucket tool.
  2. Choose a fill color from the color tool box.

Color Tools:
Tool Box : Colors

3.  Click the Gap Size modifier Gap Size Modifier Option and choose a gap size option:

  • Don’t Close Gaps : if you want to close gaps manually before filling the shape. Closing gaps manually can be faster for complex drawings.
  • Choose one of the Close options to have Flash fill a shape that has gaps.

4.  Click the shape or enclosed area that you want to fill.

To adjust a gradient or bitmap fill with the Paint Bucket tool:

1. Select the Paint Bucket tool.
2. Click the Transform Fill Transform Fill Modifier.
3. Click an area filled with a gradient or bitmap fill.
Depending on the type of object you’re painting you will see different handles:

a. Transform Linear Gradient Fills
Transform Linear Fill.

b. Transform Radial Gradient Fills
Transform Radial Fill.

c. Transform Bitmap Fills
Transform Bitmap Fill.

4. Reshape the fill in any of the following ways:

a. To reposition the center point, drag the center point.
Reposition center point of fill

b. To change the width of the fill, drag the square handle on the side of the bounding box. (This option resizes only the fill, not the object containing the fill.)
Change the width of fill

c. To change the height of the fill, drag the square handle at the bottom of the bounding box.
Change the height of fill

d. To rotate the fill, drag the circular rotation handle at the corner. You can also drag the lowest handle on the bounding circle of a circular gradient or fill.
Rotate fill

e. To scale a linear gradient, drag the square handle at the center of the bounding box.
Scale linear fill

f. To change the radius of a circular gradient, drag the middle circular handle on the bounding circle.
Scale radial fill

g. To skew or slant a fill within a shape, drag one of the circular handles on the top or right side of the bounding box.
Skew a fill inside a shape

h. To tile (repeat) a bitmap inside a shape, scale the fill.
Tile a fill inside a shape

Note: To see all of the handles when working with large fills or fills close to the edge of the Stage, choose View > Work Area.

Eye Dropper Tool

Eye Dropper Tool You can use the Eye Dropper tool to copy fill and stroke attributes from objects.

To use the Eyedropper tool:

1. Select the Eye Dropper tool and click the object whose attributes you want to copy. (When you click a stroke, the tool automatically changes to the Ink Bottle tool. When you click a filled area, the tool automatically changes to the Paint Bucket tool)

2. Click the object that you want to apply the new attributes to.

Using the Eyedropper tool to select a bitmap fill:

Rather than painting with a fixed color or gradient you can paint using a bitmap image. A very important special use of the eyedropper tool is to select bitmap fills.

1. Place a bitmap image on the stage. Either drag it from your symbol library (Ctrl+L or Window > Library) or import a bitmap image from a file (Ctrl+R or File > Import).
2. Make sure the imported bitmap is selected. (If not: click on it with the Arrow tool).
3. Press Ctrl+B to break apart the image.
4. Select the Eye Dropper tool and click on the image.

You will now see a miniature of your image in the Color Fill tool box. Use the Paint Bucket tool to apply the bitmap fill to an object. (Note: you can apply the fill to any filled object as well as any closed outlined area.)

Pen Tool:

Pen Tool The Pen tool is the only tool in the Flash toolbox that doesn’t resemble a tool from everyday life. Although the tool symbol looks a lot like an ordinary pen it works quite a bit different.

The purpose of the Pen tool is to allow you to draw precise paths as straight lines or smooth, flowing curves.

You can create straight or curved line segments and adjust the angle and length of straight segments and the slope of curved segments afterwards.

There are two methods for drawing with the Pen tool:

1. Click to create points on straight line segments
2. Click and drag to create points on curved line segments.

Each method is described below.

To draw straight lines with the Pen tool:

1. Select the Pen tool.
2. Click on the stage to set points, and watch how Flash automatically connects points as you set them.
Using the Pen Tool
3. To complete the path leaving it as either an open or closed shape. Do one of the following:
3a. To complete an open path, double click the last point or click the Pen tool in the toolbox, or Control-click (Windows) or Command-click (Macintosh) anywhere away from the path.
3b. To close a path, position the Pen tool over the first anchor point. A small circle appears next to the pen tip when it is positioned correctly. Click to close the path, and watch how Flash automatic adds a fill once the path becomes a closed outline.
Closing a path with the Pen Tool
To draw curves with the Pen tool:

First look at this 4 step example:

An example of curve drawing with the pen tool
Pen Toll Curve Example

1. Select the pen tool and click twice to create a straight line – on the second click keep the mouse button down.
2. Drag the mouse towards yourself – which will cause the control line to appear. The control line is pulled in the one end and has a drag point in the other end.
3. Move the mouse from side to side (B) and forward and down (A)- still holding down the button, and see how the drag point moves accordingly.
The drag point defines both how much and in which direction the initial straight line is dragged.
4. When the curve on the initial straight line is shaped the way you want it release the mouse button, and the end result appears while the control line disappears.

Flash Buttons:

INTRODUCTION

he only object type in Flash, that can detect mouse events is the Button object.

This means that there is only one way to make buttons with Flash: Creating a button object.

This may sound a bit too simplified, but many are confused by the techniques behind the more sophisticated buttons, that we will cover later in this tutorial.

Creating a button that changes upon mouseover-events is extremely simple. All you really have to do is to tell Flash how you want the button to look 1) in normal state, 2) when the mouse moves over the button and 3) when the user clicks the button.

Once you’ve learned this 3-step technique you can create buttons in seconds.

However, the buttons you create this way are: simple (that’s why they’re so easy to make anyway).

If you want to create really fancy buttons you should use a slightly different technique based on movie clips.

The Three Different Object Types

Flash handles three types of objects:

  • Graphics
  • Buttons
  • Movieclips

Graphics objects

You probably already noticed that when you edit Graphics objects you have the entire timeline available for it. This means that Graphics objects aren’t limited to static elements. You can easily create looping animations – simply by creating Graphic objects that uses more than one frame in the timeline.

Button objects

Buttons are different from this. When you create a Button object you only have four frames in the timeline.

One is for drawing the button in normal state.

Another is for drawing the button when a mouse-over is detected.

The third is for drawing the button as you want it to look when the user clicks the button.

The last frame is used to specify which area you want mouse events to react to. That is: you can create a button that only reacts to mouse-events on certain areas of the drawing, – like the center of the button for example.

Movie clip objects

The final object-type: Movieclips, is similar to Graphics objects – on the surface.

In both cases you can create entire animations that can be dragged onto your main movie. But while animations made as Graphics objects simply loops over and over you can control the Movieclips completely.

THE TRICK BEHIND FANCY FLASH BUTTONS

You can create more fancy buttons based on very simple programming. (You do not have to be a programmer to learn to do this!).

Actions added to frames give complete access to controlling movie-clips. This means that you can use “Play”, “Stop”, and “Goto Frame” commands on a movie-clip, that is triggered when a certain mouse event is detected on a button.

Now – if the button is invisible and placed on top of the movie clip it will work as if the movie-clip itself was able to detect mouse events.

Simple Buttons

The easiest way to create buttons with Flash is creating a Button object.

Creating a Button

To create a Button object, do this:

1: Choose Insert->New Symbol in the menu (Or press Ctrl-F8)
and the Symbol Properties Box appears.

Insert->New Symbol

Add a name for your button and make sure the Button option is selected.

2: Click OK and the button editor opens.
As you see it looks exactly the same as the standard Flash editor, with one exception:
You only have four frames in the timeline.

Timeline: Button object editor

3: Draw a button the way you want it to be when no mouse event is detected.
Notice that the active frame is labeled “Up” in the timeline.

4: Insert a keyframe in the frame labeled “Over” in the timeline.
(To do this: Click on Layer 1 in the white cell below where it says “Over”. Then press F6.)

5: Draw a button the way you want it to be when a mouseover event is detected.

6: Insert a keyframe in the frame labeled “Down” in the timeline.
(To do this: Click on Layer 1 in the white cell below where it says “Down”. Then press F6.)

7: Draw a button the way you want it to be when a mouse-click event is detected.

That’s it – you’ve created a button with three looks that will change upon mouse events.

You still need to specify which area should be clickable as well as what should happen when the button is clicked. Proceed to learn about these steps.

Defining the Clickable Area

The last frame, labeled “Hit” is special. It is simply used to specify the area that triggers mouse-events.
If you leave this frame blank – then mouse events will be triggered when the mouse moves over the visible button.

But if you draw an area that is bigger than the button – then the mouse event will occur as soon as the mouse gets even close to the button. On the contrary you can draw an area that is smaller than the button, so that mouse events are only triggered when the mouse is at the center of your button.

However, the real power of the “Hit” frame is a bit more sophisticated.
If you draw something in the hit area that is outside the area covered by the visible button – then the button will react to mouse-events in the Hit area. That means that you can make something happen on one part of the screen when the user moves the mouse over another part of the screen.

Adding Actions to the Button

The button we created so far is still in the Button object editor. We still haven’t dragged it onto our main movie.

If you look above the timeline you see two Icons labeled “Scene 1″ and “mybutton”.

Timeline: Button object editor

1: Click the “Scene 1″-icon to return to the main movie.

2: Click on the button in the Library window and drag it onto the movie.

Library Window

If your Library is not visible choose Window->Library (or press Ctrl-L) to make it visible.

3: Once the button have been placed correct in your movie right click on it and choose “Properties” in the menu that appears.
An Instance menu appears.

4: Select “Actions”

Instance menu

5: Click the plus Icon and select the “OnMouseEvent” option.

6: Select “Release” in the list of event triggers.

The action now says:

On (Release)
End On

This means that we have told Flash that it should react on a mouse-click release event.
But we still haven’t told what should happen when the event is detected.
We have several options available. The most important ones are listed below:

Jump to another Frame
Click the plus once more and select the “Go To” option.
Now, the action says:

On (Release)
Go to and Stop (1)
End On

Eventually use the options to specify the frame you want to jump.
If you don’t want the movie to stop, once the jump has been made, you should select the Go to and Play option at the bottom.

If, say, you entered frame 20 and selected the Go to and Play option, the action would be:

On (Release)
Go to and Play (20)
End On

And the Instance menu would look like this:

Instance menu

Load another page
Instead of jumping to another frame you could make the button work as a normal hyperlink.
Click the plus and select the “Get URL” option.
Now the action says:

On (Release)
Get URL (“”)
End On

If you enter http://echoecho.com in the URL field the action looks like this:

On (Release)
Get URL (“http://echoecho.com”)
End On

Controlling Windows to Load URL

You can control which window the URL should be loaded into.
In the Window filed you have four options:

  • _self : Opens the URL in the current window. (Same as if you did not specify any window)
  • _blank : Opens the URL in a new window.
  • _parent : Opens the URL in the parent frame (only works with framesets).
  • _top : Opens the page in the current window – if it’s a frameset all frames are cancelled.

This action would open echoecho.com in a new window:

On (Release)
Get URL (“http://echoecho.com”, window=”_blank”)
End On

PASSING VARIABLES TO THE URL THAT IS LOADED

The last option, “Variables” allows you to pass variables from the flash movie to programs running on the server.

If you choose either “Send using GET” or “Send using POST” Flash will open the specified URL as if it was requested by a form-submission. We will not cover the subject further here, since it really belongs to the more advanced tutorial on Flash programming.

When you’re familiar with the simple buttons explained on this page you are ready to proceed to the more advanced buttons that are based on Movie clips.
The following two pages will explain the powerful techniques behind these buttons.

Advanced Buttons

CREATING ANIMATED BUTTONS
A button like the one you see above can be created by simply inserting a movie-clip in the “over”-frame of your button-symbol.

That is:
1: Create a normal movie-clip that does whatever you want to happen when a mouse over is detected on the button.

2: Create a normal button symbol (explained on the previous page).

3: Insert a keyframe in the “over” frame of your button, and place the animated movie-clip in this frame.

This will cause the animation to start when a mouse over is detected and disappear again when a mouse out is detected.

The problem with this type of button is that it lacks “intelligence”. The animation disappear in the middle of a sequence as soon as the mouse-out event is detected.

Look at the button below instead:

CREATING TELL TARGET BUTTONS
The advanced button will finish the loop cycle before stopping the animation.

The trick is this:

1: Draw a button graphic.

2: Create a button symbol using the button graphic.

3: Use the exact same button graphic to create a movie-clip.

4: In the movie-clip: Create whatever animation you want for the button.

Now you have a button-symbol with the fixed button in it AND a movie-clip with the entire mouse-over-animation in it.

5: Place the button-symbol in your movie.

6: Add this action to the button:

On (Roll Over)
If (dummy=0)
Begin Tell Target (“/animation”)
Play
End Tell Target
End If
Set Variable: “dummy” = 1
End On

On (Roll Out)
Set Variable: “dummy” = 0
End On

The action detects a Roll Over and a Roll Out:

When a Roll Over is detected:
- it tells the movie-clip to start playing (The movie-clip plays the animation we want when a Mouse Over is detected.). At the same time it sets a variable named “dummy” to the value of 1.

When a Roll Out is detected:
- the variable named “dummy” is set to the value of 0. Nothing else happens here – and THAT is the trick in all this.

The movie-clip simply continues to play after the Mouse Out is detected – and that is exactly what we wanted. When the movie-clip finishes an animation cycle it will be at the last frame of the movie-clip, and this is where the “dummy” variable comes into the picture.

In the last frame of the movie-clip we have this action:

If (/:dummy=1)
Go to and Play (2)
Else
Go to and Stop (1)
End If

This means that the movie-clip is using the “dummy” variable to determine whether it should continue (Go to and Play (2)) or it should stop (Go to and Stop (1)).

To summarize:

1: We have a Button symbol that we use to detect for Roll Over and Roll Out.

2: On top of this button we have a Movie-clip symbol that actually plays the animation we want when a Roll Over occurs.

3: When a Roll Over is detected on our Button symbol we tell the Movie-clip Symbol to start playing. At the same time we set a variable called “dummy” to a value of 1.

4: The movie-clip will play the entire loop, and when it reaches the last frame it will check the current value of the “dummy” variable. If it is 1 it simply repeats the loop again from frame 2. If it is zero it goes to frame 1 and stops.

5: When a Roll Out is detected the “dummy” variable is set to zero which will cause the Movie-clip symbol to stop next time it completes a loop.

Now that the technique behind Tell Target Buttons is in place we just need two tiny comments to it:

First:
We need to add a Stop action to the first frame of the Movie-clip symbol – otherwise the movie-clip will start looping as soon as it is loaded – rather than stop and wait for a Roll Over event.

Second:
The Movie-clip symbol must be given an instance name.
Instance names are entered in the “Properties” dialogue box for your clip.

If you look at the action that we added to the button, you will notice this line:

Begin Tell Target (“/animation”)

“animation” is the instance name of our Movie-clip.

The reason that Flash requires instance names for movie-clips is that the same Movie-clip symbol could easily be used in several places at the same time.

For example you could create a movie clip that animated a ball jumping up and down. This movie-clip could easily be inserted twice so that you had a ball jumping both at the left and right side of the movie. If you did not add a unique name to each of these two clips it would be impossible for flash to know which one you wanted to control when referring to the movie-clip.

The technique for Tell Target buttons is fairly complex compared to the technique behind simple buttons.

Fortunately, it sounds a lot more complex than it actually is – which you will realize when you get your first Tell target button running.

Flash Tweenings :

INTRODUCTION

The term “Tweening” is derived from “in between”. Sometimes you want to add an effect that is graduated over several frames. For example, moving a car from the left side of the movie to the right side. Instead of moving the car a little bit on each frame, you can simply:

  • position the car on the first frame,
  • then insert a keyframe where the car should stop
  • and finally tell Flash to tween between the two key-frames.

Tweening simply means going from one keyframe to another while taking small steps for each of the ordinary frames in between.

Motion Guide Tween

Do the following to make a Motion Guide Tweening.

1. To insert 30 frames in your movie with the mouse:
Click frame 30 in layer 1 on the timeline – then press F5.

Timeline

2. Now you need to find the element you want to tween.
( It can be any element you like ) .

Choose Libraries > Graphics in the menu.
Library – Graphics opens.
Find Bird and with the mouse, drag it into the canvas.

Library->Graphics

Use the scale tool in the toolbox, to resize the bird as you like.
(If your version of Flash does not contain “bird”, then just use any other symbol).

3. Now enter a keyframe in frame 30. To do this, first click
frame 30 in layer one on the timeline. Then press F6.

Timeline

4. Next, double click the keyframe in frame 1.
A frame Properties Box pops up.
Choose “Tweening”, and in the Tweening drop-down menu choose “Motion”.

Frame Properties

Click OK

5. Right click on Layer 1.
A pop-up menu appears.
Choose Add Motion Guide.

Add Motion Guide

Flash now inserts a new layer on top of layer 1,
with the Motion Guide icon to the left of the layer’s name.

Timeline

This new layer is called a motion guide layer.
Motion guide layers are used to draw lines that you want an animated symbol to follow.

6. Click on the Motion Guide Layer to make sure it is the active layer.
(Click on the layer name, where it says “Guide: Layer 1″).

Choose pencil Pen in the toolbox. (Or press P on the keyboard)
Make sure pencil mode is set to “Smooth”.

Pencil Mode

With the pencil draw the line you want the bird to fly along.

For example like this:
Motion Guide Example
(Hint: Do not make complex patterns until you’re familiar with the technique).

7. Now adjust the frame pointer so it points to frame 1.

Timeline

Make sure the Snap button Snap is activated (or choose
View > Snap in the menu, to activate snapping).

8. With the mouse, place the bird so that its center is at the beginning of your motion guide.
(The center is indicated by a small + when selected).
A black circle appears when the bird is attached to the motion guide.
It can sometimes be hard to get the symbol to snap to the guide. Eventually it will though :o )
Try zooming in or out if you just can’t get the bird to snap to the guide.
Release the mouse button when the bird is snapped to the guide.

Frame 1: Bird Motion Guide

Now adjust the frame pointer so that it points at frame 30. Repeat the process
placing the bird at the end of the motion guide.

Frame 30: Bird Motion Guide

Congrats! You have just created …. (drumrolls)…… a Motion Guide Tweening!

The bird will now follow the motion guide when you play the movie.

Press Ctrl+Enter to test your movie.

Orient to path direction.

If say, your motion guide was a circle, you would have the bird fly in a thrilling loop.
However it would look kind of odd, since the bird would only follow the circle, but not
actually point the nose in the direction of the circle.
During the entire loop the bird would have its head pointing to the right :o )
Eventually the bird would fly backwards. Quite a thrill maybe… but .. not too realistic :o )

If you want the bird to actually follow the circle, not only in movement, but also in direction,
you should double click the keyframe in frame 1 on layer 1.
This will reopen the frame properties box.
Choose the “tweening” option.
Select the “Orient to path direction” option, and click ok.

[Via techiwarehouse]


109 Responses

  1. Fantastic blog! I actually love how it is easy on my eyes and also the information are well written. I am wondering how I could be notified whenever a new post has been made. I have subscribed to your rss feed which should do the trick! Have a nice day!

  2. Definitely a very good blog post in relation to the topic, maintain the good work also I hope to examine more of your stuff in the long run.

  3. Liar game says:

    Since matching for some time for just a proper read in considers to this kind of ecological niche. Essaying in Bing I now spotted this web site . Look this information So i am pleased to convey that I have a very good depression I faltered onto whatever I was ready for. I’ll make sure to don’t forget this internet site and devote it a look systematically.

  4. 蛙鏡 says:

    Hey guys, this good wook!

  5. cfnm secret says:

    It was an absolute pleasure to read through your creation with all the interesting themes you write about. My imagination went wild with all the thorough words you used. Please continue to grace us with your work as it is truly enjoyed.

  6. Sooooooo amazing submit, i love some words so much and can i quote a few of those on my weblog? Also i have emailed you regarding could it be possible for us to exchange our links, hope hearing from you soon.

  7. buy rs gold says:

    Considerably, the post is really the greatest topic on this related issue. I concur with your conclusions and will eagerly look forward to your forthcoming updates. Just saying thanks will not just be enough, for the tremendous clarity in your writing. I will right away grab your rss feed to stay privy of any updates.

  8. I really enjoyed this post. You write about this topic very well. Logos are key for the reason that you want people to see a visual image of your company or business. When people see your logo, you want them to instantly correlate that logo design with your business and no one elses. If your logo is simple and unique people will associate your logo with your company. A logo is one of the best ways to make impact with a brand name when done right.

  9. excellent writing skills & also I just had a quick question for you.. is this a WP theme blog or is it a different theme? I really like the design

  10. cll leukemia says:

    Thank you for give very good knowledges. Your blog is so coolI am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more. You, my friend, ROCK! I found just the information I already searched everywhere and just couldn’t find. What a perfect site. Like this website your website is one of my new favs.I like this site presented and it has given me some sort of inspiration to succeed for some reason, so keep up the good work

  11. Susan Felten says:

    TY a lot for penning this, it had been unbelieveably informative and helped me a lot

  12. very nice post, i certainly love this website, keep on it

  13. Issac Maez says:

    Thanks for posting!

  14. 蘆洲買屋 says:

    Keep the faith, my Internet friend; You are a first-class writer and deserve to be heard.

  15. I apperceive i am a small away topic, but i just funds to say i adulation the blueprint of the blog. i am new in the direction of blogegine platform, so any tips on accepting my web page analytic good can be appreciated.

  16. I just now wanted to tell you how much my spouse and i appreciate almost everything you’ve provided to help improve lives of men and women in this subject matter. Through your own articles, I have gone from just a newbie to a pro in the area. It truly is truly a honor to your efforts. Thanks

  17. Sandy says:

    *You should take part in a contest for one of the best blogs on the web. I will recommend this site!

  18. It’s rare to get a professional person in whom you will surely have some confidence. In the world in the present day, nobody genuinely cares about showing others the way out in this subjecttopic. How lucky I am to have found such a wonderful site as this. It is really people like you that make a genuine difference currently through the thoughts they share.

  19. It’s hard to find knowledgeable people on this matter, but you sound like you already know what you’re speaking about! Thanks

  20. Some genuinely nice and useful information on this internet site , besides I believe the design has got excellent features.

  21. You made some decent points there. I looked on the internet for the subject matter and found most guys will go along with with your blog.

  22. I like the valuable info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I’ll learn many new stuff right here! Good luck for the next!

  23. enjoyed and informative write-up … i appreciate you took the time to comment on this subject. gracias!.

  24. I have read several good stuff here. Definitely worth bookmarking for revisiting. I wonder how much effort you put to create such a excellent informative site.

  25. I feel far more folks should be required to read this, really good info.

  26. I was very pleased to seek out this internet-site.I wanted to thanks to your time for this wonderful read!! I positively having fun with each little bit of it and I’ve you bookmarked to check out new stuff you blog post.

  27. I’m commenting to let you be aware of of the fine experience my friend’s girl went through studying your web page. She mastered a good number of details, which include what it’s like to have an awesome teaching spirit to get folks with ease have an understanding of certain impossible topics. You really did more than our expected results. Many thanks for delivering the great, trustworthy, explanatory and also cool tips on your topic to Kate.

  28. There are some attention-grabbing time limits on this article but I don’t know if I see all of them heart to heart. There may be some validity but I’ll take maintain opinion till I look into it further. Good article , thanks and we would like extra! Added to FeedBurner as nicely

  29. Nakia Conour says:

    Its excellent as your other content : D, thanks for putting up.

  30. well thought-out article, as a matter of fact we wanted much more. bookmarked to come to your site and look for more enjoyable post.

  31. I am constantly searching online for articles that can benefit me. Thanks!

  32. Very good blog post. Great.

  33. I truly wanted to write down a quick note in order to thank you for all of the splendid advice you are writing at this website. My extensive internet look up has at the end been paid with sensible strategies to share with my good friends. I would assume that many of us readers are quite endowed to exist in a useful site with so many awesome people with great plans. I feel very fortunate to have encountered your web site and look forward to really more awesome minutes reading here. Thanks a lot once more for everything.

  34. Earth4Energy says:

    I really like your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to create my own blog and would like to know where u got this from. cheers

  35. Spot on with this write-up, I truly suppose this web site wants far more consideration. I’ll in all probability be once more to learn way more, thanks for that info.

  36. Finally a smart blogger-man…I love how you’re thinking…and writing!

  37. Aw, this was a very nice post. In concept I wish to put in writing like this moreover – taking time and actual effort to make an excellent article… but what can I say… I procrastinate alot and certainly not seem to get something done.

  38. I’m impressed, I must say. Actually rarely do I encounter a weblog that’s each educative and entertaining, and let me tell you, you have got hit the nail on the head. Your thought is outstanding; the difficulty is something that not enough individuals are speaking intelligently about. I am very blissful that I stumbled across this in my seek for something regarding this.

  39. Great blog, Just wanted to comment that i can not connect to the rss stream, you might want install the right wordpress plugin for that to workthat.

  40. thomas says:

    Mate, you are a good writer. Your text is really good. You ought to do it professionaly

  41. Madlyn Plumb says:

    I loved your post.Much thanks again. Want more.

  42. Reanna says:

    *An impressive share, I just given this onto a colleague who was doing a little analysis on this. And he in fact bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If possible, as you become expertise, would you mind updating your blog with more details? It is highly helpful for me. Big thumb up for this blog post!

  43. adam says:

    What an amazing news. I am trully glad. Keep writing man

  44. I’ve bookmarked this post,interesting perspective and a good read

  45. broadband tv says:

    Great article. Your articles are a pelasure to read and very helpfull indeed. Thank you.

  46. Intriguing strategy. I’m suprised I didn’t see this on some of the huge news sites first.Nicely played!

  47. zapl says:

    Man, you are a good writer. Your article is so interesting. You should do it for a living

  48. thomas says:

    Just want to thank you for this great text. This is kind of a thing I was searching for (Thanks Google

  49. I precisely desired to thank you very much again. I am not sure the things that I would’ve made to happen without the type of techniques documented by you regarding such concern. This has been a real frightening issue in my opinion, but discovering your professional style you handled it took me to jump with gladness. I will be happier for this service and thus have high hopes you know what an amazing job that you’re getting into teaching the others through your webpage. Probably you’ve never encountered any of us.

  50. ps3 says:

    Thank you for making our students have access to your blog post. Your kindness will be greatly appreciated. I have some ongoing plans and I wanted them to assist me with it. The only way they were able to accomplish that was carry out some research on the internet so as to help to make my work faster. These people came across your site as well as the content on it, specially this blog post, actually helped them to get good conclusions about what we needed to carry out. Of course, I will keep visit the site for brand new updates on this top and other issues of curiosity.

  51. Air Max 95 says:

    I wish you all permissible era, this site is exceptionally gracious I would always carry on this site. Purloin me a drawing of timedata would be btained from this site, or anticipation to. But I scarcity you to know that this site is extraordinarily appropriate Thanks a allotment as a replacement for the kind of unmatched question at hand this topic.

  52. It is best to participate in a contest for among the best blogs on the web. I’ll recommend this web site!

  53. Really nice blog you have. Cheap rates on SR22 Texas auto insurance

  54. I review your blog all the convenience life and I upstanding thought I’d disclose follow up the well-proportioned cultivate!

  55. 654753cye53m says:

    Hi! I just found your great blog with Google and i love it!

  56. It’s best to participate in a contest for among the finest blogs on the web. I will recommend this web site!

  57. I’m new on here, I hit upon this website I spot It charming productive and its helped me unlit a lot. I thinks fitting be expert to contribute & succour other users like it has helped me.

  58. buying gold says:

    I’m impressed, I need to say. Actually hardly ever do I encounter a blog that’s both educative and entertaining, and let me let you know, you may have hit the nail on the head. Your idea is excellent; the difficulty is one thing that not enough individuals are talking intelligently about. I’m very pleased that I stumbled across this in my search for something referring to this.

  59. Hello, Nice website. Go Bartending is The Ultimate Home Study Bartending Training Program

  60. Advantageously, the post is in fact the sweetest on this laudable topic.

  61. hi,buddy. I was told by one of my classmats to visit your site. I love the look of the website greatly. The article is very amazing. Please keep on the good work. I surely will browse it frequently and inform it to my relatives.

  62. There are some interesting cut-off dates on this article however I don’t know if I see all of them middle to heart. There may be some validity but I’ll take hold opinion till I look into it further. Good article , thanks and we want extra! Added to FeedBurner as nicely

  63. I commend the illuminating article you provide in your articles. I’ll bookmark your blog and have planned my friends explore up in your blog frequently.

  64. Air Max 92 says:

    I’m very satisfied to I ground this post. Tender thanks you over the extent of sharing us nice info.

  65. Great share ill be back soon.

  66. hey, this might be bit offtopic, but i am hosting my locality on hostgator and they will suspend my hosting in 4days, so i would like to apply to you which hosting do you expend or recommend?

  67. Cedric Hight says:

    Hi there I think your weblog is extremely fantastic i found it on Yahoo I feel will come again again

  68. Air Max 95 says:

    I really loved reading your post. Thanks!A field close-fisted to my heart cheers, do you take a RSS support ?

  69. I derive pleasure reading it. I miss to learn more on this subject.. Thanks over the extent of letter this amazing post.. Anyway, I am gonna subscribe to your feed and I desire you list inform again soon.

  70. John smith says:

    Hey could I reference some of the information from this post if I reference you with a link back to your site?

  71. Wow, that looks so beneficial!Peradventure you have changed your keynote not too extensive ago? First because I could include sworn it was not the same the antecedent age I was here…unless I am intelligent of a distinguishable trap site.

  72. I found your blog via Google while searching for the related topic, your blog came up. Thank you for the fantastic blog. Amazingg skills! Continue man, you rock!

  73. Appreciate it for all your efforts that you have put in this. very interesting info .

  74. Air Max 2009 says:

    Advantageously, the send is in reality the sweetest on this deserving topic.

  75. I dugg some of you post as I cerebrated they were very useful invaluable

  76. Keep up the good posts- great work.

  77. name mean says:

    [...] … great article. Trackback from … [...]

  78. I can tell that you are very knowlegeable. Im launching an online site soon, along with your information can be quite helpful for myself.. Interesting help and also wishing everyone the achievement in your business.

  79. There’s noticeably a bundle to find out about this. I assume you made sure good factors in options also.

  80. l1 visa says:

    A person essentially lend a hand to make critically articles I’d state. That is the first time I frequented your web page and up to now? I surprised with the analysis you made to make this particular publish incredible. Excellent job!

  81. You have a great Blog right here Mate. Adore your articles or blog posts quite informative, Please hold up the great work.

  82. I benefit reading it. I have need of to learn more on this subject.. Thanks for letter this amazing post.. Anyway, I am gonna subscribe to your support and I whim you list inform again soon.

  83. Thanks for this post. I definitely agree with what you are saying. I have been talking about this subject a lot lately with my father so hopefully this will get him to see my point of view. Fingers crossed!

  84. WONDERFUL Post.thanks for share..extra wait .. …

  85. It’s onerous to seek out knowledgeable folks on this subject, however you sound like you understand what you’re speaking about! Thanks

  86. Air Jordan 4 says:

    Because of reading your blog, I decided to inscribe my own. I had not in any degree been interested in keeping a blog until I slogan how kind yours was, then I was inspired!

  87. Nice post – Thanks a lot.

  88. I like to afflict your instal a pair times a week for different thoughts. I was wondering if you bring into the world any other topics you send a letter about?

  89. Magnificent. merely magnificent…i haven’t just about any statement to understand the following submit…..Genuinely i am pleased out of this write-up….the one who build this specific article he could be a great human..thanks for distributed this specific with us.i came across the following useful and also fascinating web site and so i assume thus it is handy and knowledge

  90. If conceivable, as you clear expertise, would you mind updating your blog with more information? It is damned sympathetic looking for me.

  91. This is getting a bit more subjective, but I much prefer the Zune Marketplace. The interface is colorful, has more flair, and some cool features like ‘Mixview’ that let you quickly see related albums, songs, or other users related to what you’re listening to. Clicking on one of those will center on that item, and another set of “neighbors” will come into view, allowing you to navigate around exploring by similar artists, songs, or users. Speaking of users, the Zune “Social” is also great fun, letting you find others with shared tastes and becoming friends with them. You then can listen to a playlist created based on an amalgamation of what all your friends are listening to, which is also enjoyable. Those concerned with privacy will be relieved to know you can prevent the public from seeing your personal listening habits if you so choose.

  92. Hello there, simply become aware of your blog via Google, and located that it’s really informative. I am going to be careful for brussels. I’ll appreciate should you proceed this in future. Many people shall be benefited out of your writing. Cheers!

  93. coin says:

    I have really learned result-oriented things by your weblog. One other thing I’d prefer to say is that newer computer operating systems have a tendency to allow a lot more memory to be played with, but they likewise demand more storage simply to function. If one’s computer cannot handle a lot more memory as well as the newest software requires that memory increase, it is usually the time to shop for a new PC. Thanks

  94. Spot on with this write-up, I really suppose this web site needs far more consideration. I’ll in all probability be once more to learn much more, thanks for that info.

  95. Lunch Bags says:

    I always visit your blog everyday to read new topics.:~~~`

  96. Air Max TN says:

    I be familiar with your blog all the on occasion and I honest thinking I’d say mind up the decorous cultivate!

  97. Say thank you you looking for another staggering article. Where else could anybody get that well-intentioned of poop in such a great path of writing.

  98. This can be i am in search of. Here is what I refer to value. The information provided in here will be to the most. I need to say you will need put in it slow in putting each one of these content material with each other. They’re relevant to your topic. I’ll endorse these to all and also to all of my buddies. I’ll return here to examine how much work. Appreciate building this kind of transpire.

  99. This internet site carries a very good offer of very good straight down to earth well getting information also it will require to hold out tremendously well, if it hasn’t already? I liked studying about some while using products!

  100. Air Jordan 3 says:

    I exceptionally loved reading your post. Thanks!A theme near to my crux cheers, do you acquire a RSS graze ?

  101. Are you able to write another article relating to this subject due to the fact this post would be a bit tricky to understand?

  102. pleasant and in depth written data thank you.

  103. I have read a couple of the posts on your web site today, and I really like your way of blogging.

  104. Roy Blackie says:

    Rattling clear web site , thanks for this post.

  105. Can you please present extra data on this subject? I am clearly on the lookout for extra information about this. BTW your blog is great. Cheers.

  106. Very interesting information!Perfect just what I was looking for!

  107. good post.Never knew this, appreciate it for letting me know.

Leave a Reply

Proudly designed by Theme Junkie.