Flash Games

Flash Games, Actionscript 3, Actionscript 2

Fire a Projectile (arrow) Using Atan2, AS2

by: Matt Hofstetter | March 11 , 2011 | views: 425

In the example above, we move the arrows using Math.cos and Math.sin, just like when we moved the ball in Rotate and Move an Object Using Sine/Cosin, AS2. The difference is that instead of using the LEFT and RIGHT arrow keys to change the angle of the object, we will be calculating the angle using the… view article

How to Create an Explosion in Flash, AS2

by: Matt Hofstetter | March 11 , 2011 | views: 454

To create an explosion in Flash like the one above we first need the frames that make up the animation. We will be using 25 .png files with transparent backgrounds and a resolution of 100x100 for this animation. To learn more check out Explosions in Studio Max. The first thing we need to do is… view article

Basic Collision Detection Using the Pythagorean Theorem AS2

by: Matt Hofstetter | March 11 , 2011 | views: 393

In this tutorial we will write a simple function that will tell us if any two objects are touching. The algorithm for this function is surprisingly simple. If the distance between object A and object B is less than their combined radii, they are touching. So, what we need first is a smaller function… view article

Rotate and Move an Object Using Sine/Cosin, AS2

by: Matt Hofstetter | March 11 , 2011 | views: 448

In Move a Movie Clip with the Arrow Keys, AS2, we showed you how to move an object UP, DOWN, LEFT or RIGHT using the arrow keys. In this tutorial however, we assume that you want to create a more naturally moving object, for example, steering a car (or tank), or moving an object, such as a ball, from… view article

Move a movie clip with the arrow keys AS2

by: Matt Hofstetter | March 5 , 2011 | views: 131

Moving an object with the arrow keys in Actionscript 2 is a piece of cake compared to other languages like Java. In fact, the descriptive nature of AS2 code pretty much speaks for itself. var speed = 5; this.onEnterFrame = function(){ if(Key.isDown(Key.UP)){ spider_mc.play(); … view article