Tips     Beginners     Intermediate     Advanced     Resources     E-mail me

Resources

The book I'm using is Inside Flash
Author: Jody Keating
Website:
New Riders
ISBN: 0-7357-1105-4

Websites

MacroMedia.com

FlashKit.com


Beginners

Back to top

Goto the Macromedia Site and do the Beginners Tutorials.

Exercise

Practise Motion and Shape Tweening by duplicating this file. See (Tips below)

Intermediate

Back to top

You will recall from Java the difference between Classes and Objects. An object is an instance of the class, it has the same general properties, say a Circle has an area dependent on its radius. Each circle object will have a different radius but it is still a circle.

In Flash Symbols are equivalent to Classes and they are stored in the Library Window->Library. You can create an instance of the symbol.

Start Flash and do lesson 03 Symbols. Click on Help -> Lessons -> 03 Symbols Have a look at this. Load the corresponding .fla and click on each button and press Ctrl+Alt+A to view the action window.

If you click on each of the circles and look at their name in the instance panel, it should be clear what's happening. We are refering to the object by it's name and then just changing it's x position on the screen by adding or subtracting 10 from the position depending on which button is pressed.

Learn about the Project Explorer.
Load the file MovieExplorer.fla and go through the exercises in the handout.

Exercise

Create a cartoon. This should tell a story e.g. illustrate a nursery rhyme or perhaps a good joke that you know.

Example

Little Miss Muffet sat on a tuffet,
Eating her curds and whey,
Along came a spider and sat down beside her,
and chased Miss Muffet away.
A basic version. A more presentable version. There are three differences, can you spot them??

Advanced

Back to top

A clone of the classic "Arkanoid" arcade game will be written.

Step 1 : Drawing the bouncing ball
Step 2 : Improving the Code
Step 3 : Including a paddle
Step 4 : Improving the Code

Exercise 1

This game is very simple, easy to play and boring.

There are a number of things that we can do to make it more interesting.

Create a scoreboard using dynamic text.
Vary the speed of the ball.
Have different levels, e.g. if the score reaches a certain number make the paddle smaller in size (myPaddle._width -=10; say) or increase the speed of the ball.
Have a restart function so that when the game finishes we can have another go.
Give the player three lives.
Make it a two player game by creating a second paddle. You will have to using boolean variables to check whose turn it is.

Try doing some of these things. Some of them have been done already on the next exercise. Browse through the handout of the next exercise to implement them or go ahead and do the next execise.

Exercise 2

Create a Shoot-Em-Up by following the Games tutorial at FlashKit.com

A few things to note. Make sure you follow the instructions carefully and fully.
When you're putting in the "Game Over" text ensure it is static rather than dynamic text.
Ensure all the instances are named correctly. Use the Movie Explorer to compare your code against the one on the tutorial website


Tips

Back to top

Pressing the Tab key hides the panels.

Motion Tweening

  1. Place item on the stage
  2. Convert item to Symbol : Insert -> Convert to Symbol (F8).
  3. Highlight item and click on frame 30.
  4. Insert-> Key Frame (F6) @ Frame 30.
  5. Reposition item in Frame 30.
  6. Click on Frame 1 and choose motion tweening (Insert-> Create Motion Tween)
Note:Groups of objects or Symbols cannot be Shape Tweened A Yellow warning sign will appear on the Frame Panel if you try.

To run through the frames use the Controller (Windows -> Toolbars -> Controller)

Use the x and y coords in Windows-> Panels -> Info to change the size and position of the objects.

Double Click on the Layer Name to change the name of the layer.
Change the name of objects by using Windows -> Movie Explorer right click on the name e.g. Symbol1 and choose Rename

Properties of the movie such as the Frame Rate can be changed in Modify -> Movie (Control M)

Lock layers (click on the . below the padlock symbol) that you are not using so that you don't accidently delete things in them. You can also hide the layer be clicking on the . under the eye symbol. lock layer

The panels can be rearranged by dragging and dropping them. Create your own panel setup of the panels you use most and then choose Window -> Save Panel Layout to save this for future reference. You can load this panel setup via Window -> Panel Sets ->

If you create a rectangle and want to delete it, clicking once on a side will highlight that side, double clicking on it will highlight the entire rectangle.

When creating "cartoons" use the Movie Explorer (Control+Alt+M) and the Scene panel to edit the movie. Note that scenes can be duplicated in the Scene panel. (Use the button at the bottom of the scene panel to the left of the "+" and "wastebin" button). scene

When writing ActionScript code it is useful to put in comment using "//" like in Java. It helps if there's a comment at the top saying which object the code is for and what the code does.

In Edit -> Preferences Choose Flash 4 Frame Drawing so that blank key frame are symbolised by an open circle.

Back to top