function mouseclickHandler(e:Event):void {
shootBullet();
}
function shootBullet() {
var bullet:MovieClip = new Bullet();
bullet.x = Ship.x;
bullet.y = Ship.y;
addChild(bullet);
bullet.addEventListener(Event.ENTER_FRAME,moveBullet);
}
function moveBullet(e:Event):void {
e.target.y -= 5;
if (e.target.y <= -10) {
e.target.removeEventListener(Event.ENTER_FRAME, moveBullet);
removeChild(MovieClip(e.target));
}
}
function keydownHandler(e:KeyboardEvent):void{
if (e.keyCode == Keyboard.SPACE) {
shootBullet();
}
}
stage.addEventListener(Event.ENTER_FRAME, checkhit);
function checkhit(myevent:Event) :void {
for (var i:int = 0; i < 15; i++) {
if (blockArray[i].hitTestPoint(mouseX,mouseY,true)) {
blockArray[i].alpha=.3;
Ship.play();
}
Thursday, 24 November 2011
Wednesday, 9 November 2011
Flash Games research
I have been researching about flash games over the past few months, one game in particular is a flash game called Asteroids. To play this game, you need to avoid getting hit by the asteroids and space ships. You defend yourself by breaking apart the asteroids with your gun and shooting down the space ships, when you clear the area, you advance to the next level where everything gets harder. You lose a life when you have been hit. You have a total of three lives. You earn a life when your score exceeds 10,000 points. The controls are quite good, you move forward with the up arrow, you rotate left and right with the left and right arrow keys and you shoot with the space bar. The ship as a slight drift after you have been moving which shows more reality about playing a game in space. All the graphics are basic, the ship is a basic triangle which has an exploding animation when hit. Also when moving you can see a flame shoot out from the ship to show the rocket booster. Overall I think this is a great and addicting flash game which was made a long time ago and still remains fun. I am hoping to make a game similar to this just so I can take one step forward in the gaming world.
Subscribe to:
Comments (Atom)


