First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Dennis Stone

Let's get started.

What I'm going to walk you through in this tutorial is the creation of two movie clip symbols (a simple circle image and a square, we'll call these movie clips ball and box from here on out), randomly placing instances of the box movieclip along the x coordinate at the bottom of the screen, and randomly placing instances of the ball movieclip along the x coordinate at the top of the screen. The boxes will travel upward along whatever x coordinate they are placed, and the balls will travel downward along whatever x coordinate they are placed. We will then add collision detection code and remove any instances that collide.



First thing we'll do is create our movieclip symbols, in a new flash project create a movieclip symbol (add it directly do the library, don't place it on the canvas then convert to symbol), of a box and name it "box", don't forget to right click on the symbol in the library panel afterwards and select Linkage --> Export and use the name "box" again. Do the same thing for ball. Try to make them about an inch in width/diameter (if they are too small the chances of them colliding will be poor, if they are too big the chances of them not colliding will be poor, we want a good balance.)

Now that you have the 2 movieclip symbols right click on frame 10 in the main timeline and add a keyframe, then do the same for frame 1. Frame 1 will just be variable declarations, so we'll do that last once we know what all of the variables we'll be using are. In Frame 10 right click, select the actions panel, and put it in expert mode.

» Level Advanced

Added: 2001-06-07
Rating: 6.97 Votes: 186
(10 being the highest)
» Author
No details available.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.