Thank you for visiting Blazing Games

Throwing

The proper way to handling throwing would be to create a mathematical model of the throw and determine the size and location of the snowball strictly through calculation. This is certainly possible to do in Flash, but is not the way I did the animation. I had considered going with the mathematical route, but figured I would first try an animation route.

Thrown objects tend to form an arc. My first thoughts were to create this arcing motion and then apply it to where the mouse was clicked. This simply did not result in proper looking throws. Not wanting to figure out all the math needed to handle the throw I decided that having the throw animation tied to the target might be the solution. There are nine targets, so this may sound like a lot of work, but in reality, it is not as the canned animation would simply follow a preset motion guide. Creating nine motion guides is not a very difficult task.

By having the player only able to throw snowballs at set points on the playfield we have fairly good control over the look of the throw. The problem we are left with is that we need a way of letting the player know when they can throw a snowball or not. This problem is easily solved by making use of the versatile Flash button. The target button is an empty up frame, crosshair over frame, locked crosshair down frame and a solid block for the hit portion of the button. By simply placing the bounding box over the location the target is going to appear, the player will know where they can throw a snowball.

The following screen shot shows you what the actual programmer view of the playfield looks like. The light-blue areas are the buttons (Flash conveniently makes buttons with no up image appear as a transparent image of the hit area).

targets

Previous Page
1 2 3 4 5 6 7 8

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2004-2006 Blazing Games Inc. All Rights Reserved.