ActionScript 3.0 :: Attempting To Make An Up-side-down Space Invaders Like Game?

Dec 18, 2010

I've been following a tutorial on [URL] but changing and removing various things to fit to the game I am (very, very slowly) trying to make. I am attempting to make an up-side-down Space Invaders like game, but with balloons instead of aliens.

So far (by following the tutorials and being lucky) I have managed to make the player's ship which moves by pressing the arrow keys and can shoot two (blue) lasers when the spacebar is pressed. The enemy balloons randomly appear below the bottom of the screen and shoot a laser upwards towards the player's ship when the player goes above (Y axis I think) any balloons.

The problem is that the balloons fire a massive stream of shots (red lasers), but I want to delay each next shot by a few seconds, but the time of the delay doesn't matter because I'll tweak it later.

I've been trying to make delays for the balloon lasers by copy/pasting bits of code from Ship.as in an attempt to make it work ...Maybe it's a good time to say I am a complete noob at AS3 apart from when it comes to messing up and having no idea what is going on

I've attached my current (broken) work and a working SWF of before trying to add delays to the balloons shots. If you want to see it working first hand then replace the Balloon.as in actionscript.game with the Balloon(working).as and change the filename to Balloon.as.

View 1 Replies


Similar Posts:


AS3 :: CS3 Space Invaders Game

Mar 15, 2009

I am making a space invader game as a uni project. Please seee attched file.I am getting an error:TypeError: Error #1009: Cannot access a property or method of a null object reference. at MethodInfo-19()It only happens sometimes when an invader is removed in the moveBullet method I think but basically the game behaves incorrectly and sometimes goes to the You Win frame even if the user has lost or just lost a life.

View 1 Replies

ActionScript 3.0 :: Making A Space Invaders Game

Sep 26, 2009

how to make a Space Invaders game (with a twist). I have previously made a game in Actionscript 1.0, which may be viewed at [URL] (press S to start the game after typing in your name).

I want to use this project as an exercise for learning AS 3.0, and I a cannot really see how I need to use separate AS files (Actionscript classes)

View 5 Replies

ActionScript 3.0 :: Space Invaders Laser Spawning?

May 8, 2009

I am working on making a Space Invaders clone to practice up my AS3. One of the main things in this project is that I want to make all of the graphics through Actionscript, simply because I have never worked with any sort of object in Flash that way. It's been an interesting challenge so far but I keep getting stumped on firing lasers. From what I can tell I have it semi-working, but when I press Space to fire I get this error:ode:TypeError: Error #1009: Cannot access a property or method of a null object reference.at Laser$iinit()at Ship/::movePlayer()Here are my as files nudge in the right direction. Laser.as:

Code:
package {
import flash.display.Sprite;

[code].....

View 8 Replies

ActionScript 3.0 :: Make Image To Follow Mouse Only Side To Side

Nov 11, 2010

I am on a tight deadline and looking for the AS3 code of how to do what this company does on their site:URL...However, I don't know AS3.Literally my project requires I recreate the what is shown with the hand holding the sharpie and moving only back and forth restricted to a centered rectangular area at the bottom of the screen.I know how to import the image that follows the mouse to the stage, and to make it a movieclip. Let's say I have named the instance "Image_mc".Does anyone have the actionscript for how to do this? Do you attach it to the object or to a keyframe on a separate actions layer?

View 5 Replies

ActionScript 1/2 :: Start Game With Space Bar?

Aug 26, 2011

My project is almost complete except for this last little thing that's been bugging me. A tutorial I followed had you start the game by clicking a button but I would like to change that to pressing the spacebar starts the game. I tried:

if(Key.isDown)(Key.SPACE))
{
_root.ship.newGame();
}

[Code].....

View 3 Replies

ActionScript 3.0 :: Flash New Game - Set Up The Key Press And Know Space Is 32?

Jul 14, 2010

I am currently working on a new game and I need help on this part. It is probably simple to do but I am a noob. Basically I am making a window cleaning game and I have set it up so that the dirt slowly dissapears through the frames. What I need to know is how to I script it so that each time I press space it jumps to each frame.

e.g hit space jump to frame 2 press again jumps to next frame.I know How to set up the key press and know space is 32..

View 4 Replies

ActionScript 3.0 :: Color Objects That Are Flying Around In Space Game?

Jul 5, 2011

trying to color objects that are flying around in my space game.When I shoot and hit them - the affected enemies shall blink. The graphics are pre-rendered (i.e. there's an rotation array and function where the degrees and their appropriate rotation for the objects are stored / calculated for better performance).

So - my idea was to enhance that rotation function with a functionality for additional coloring; but the colored AND rotated objects shall be stored apart of the normal rotated objects. To accomplish this I made a nested array:in row one there are 360 rotated graphics of one object and in row two there are 360 graphics of a rotated and colored object.

Problem: Coloring works but they are not rotated (always at 0 degrees).

Code:
public function createRotationWithColorBlitArrayFromBD(sourceBitmapData:BitmapData, inc:int, offset:int = 0):Array
{
trace("sourceBitmapData.width=" + sourceBitmapData.width);

[code]....

View 4 Replies

ActionScript 2.0 :: Space Game - Remove Fuse Movieclip?

Jan 7, 2005

I tried to do a space game But there is a big big big problem I couldn't remove the movieclip (bomb)Here is the fla CAN YOU HELP ME?

can you remove the "fuse" for me

View 5 Replies

Flash :: Side Scrolling Racing Game

Jul 28, 2011

I'm making a top-view side-scrolling racing game in Flash AS3. I'm unsure about the best way to store levels in the game.Please provide suggestions for both tile-based and art-based backgrounds.

View 2 Replies

ActionScript 3.0 :: Car Side Collission In Top View Car Game?

Mar 30, 2011

am working on a car game,can any one help me to find car side collission, actually the method I used is hittestpoint.

View 3 Replies

ActionScript 3.0 :: Making Game - Zoom In And Out By Holding And Letting Go Of The Space Bar?

Dec 28, 2010

I am making my first game and it's my first time using actionscript. I am making a sniper game themed with the L96A1 sniper rifle from COD: Black Ops and the map nuketown. I'm in cs5 with ac3 and on my stage I have two movie clips that I'm working with. I'm not really sure if they're supposed to be movie clips though. Anyways, one is the gun, and the other is the zoomed in scope overlay thingy.

For now, I'm trying get the zooming in to work. I haven't done anything else though except collect graphics for enemies, the landscape, the gun, and the scope. I want to make it so that you zoom in and out by holding and letting go of the space bar. Also,I want to make it so that when you are not zoomed in, the gun moves horizontally at the bottom of the screen (aligned vertically with the cursor). And when you are zoomed in, the scope crosshair is the cursor.So my idea was to set the gun as the cursor and make it only move horizontally at the bottom of the stage and then make an event listener that listens to when the spacebar is pressed and when it is, disables the gun as the cursor (and makes it transparent to get it off the screen) and makes the scope the cursor [was transparent, now opaque and unrestricted(vertical movement also)].

I got as far as making the gun move horizontally at the bottom with the cursor. I cant get the event listener working because I don't really know how to go about changing the opacity of each movie clip and how to switch cursors. So I am asking how do I change the opacity and switch the cursors when the spacebar is held and then reverse those changes when the spacebar is released? Here's my code on an "actions" layer [I haven't done any animations yet, so everything is on frame 1. Also, I used a couple preset code snippets since I have no previous experience with actionscript (I can understand most of it though)]:

Code:
import flash.events.KeyboardEvent;
// make gun cursor
stage.addChild(gun);[code]..........

Here's a link to a zip archive with all the files used so far (I hope this google docs link works): link

View 2 Replies

ActionScript 3.0 :: Simple Space Ship Game - Motion Synchronization

Oct 12, 2010

I was trying to make a game with simple spaceships and a bullet that is supposed to hit them and delete them on screen. As all ships are deleted the level gets up by one, increasing number of ships to delete. I think the collision detection part of my program works fine, but their is some problem in their motion synchronization.

Code:
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
public class HitGame extends Sprite {
[Code] .....

View 6 Replies

Flash :: Data Structure For Side Scrolling Game?

Mar 27, 2011

I was just wondering what the best data structure would be to use to represent data objects in a side scrolling game, basically the stuff the user can't see isn't on the stage so I would generally create a custom class to define its properties (x,y,weight,type, derp, etc) and then push that into an array and as the user moves forward I project the info from the array while checking if their x position is.

The problem that can occur is that the user can move left and right so whats the best way to keep track of the indexes?

View 2 Replies

Actionscript 3 :: Flash Side Scrolling Game Theory

Feb 28, 2012

My goal: To create a side-scrolling motocross game (horizontal - already have terms on side scrolling methodology).The bike - should react to jumps, etc.Wheels need to turn when gas is pressed, etc (is this a basic animation on keyboard events, or is it actually what 'drives' the machine??)The rider - should hang on to bike, lean forward, backward, etc.My question lies within where should be the best place to start? I know this isn't going to happen over night, and my primary focus is on the bike & suspension & rider physics (making sure the suspension/bike/rider react correctly to bumps).URL...

View 2 Replies

ActionScript 3.0 :: Create A Side Scroller Platform Game?

May 24, 2008

I've been searching online now to find a tutorial on how to create a game like thisI don't have a lot of experience with action script I've only used flash for animations. I found 1 tutorial that was useful but it only gave code and text with out a .fla or images. If you could tell me what I need to do to accomplish this and where to put code ect

View 13 Replies

ActionScript 3.0 :: Create A Side Scroll Game In Flash?

Nov 24, 2011

create a side scroll game in flash..and i dont know whats the easiest and best to do it,, if i can i wish my game can access to a database to save and load it.

View 5 Replies

Flash :: Store Levels - Side Scrolling Racing Game?

May 3, 2007

I'm making a top-view side-scrolling racing game in Flash AS3. I'm unsure about the best way to store levels in the game.

View 1 Replies

Actionscript 3.0 :: Creating A Side-scrolling Action Game In Flash?

Nov 15, 2011

As you may have seen from my previous posts, I am creating a side-scrolling action game in Flash/Actionscript 3.0. Right now I am trying to get enemy objects to face the player's direction. Here is what I mean (dartD1 is an instance of the enemy character object. If its scaleX is 1, it's facing right; if its scaleX is -1, it's facing left):

[Code]...

View 2 Replies

ActionScript 3.0 :: Making A Simple Side-scrolling Platform Game?

May 20, 2011

how to respond when a rectangle hits another rectangle? I already know how to detect the collision, I just don't know how to respond to it. I'm just trying making a simple side-scrolling platform game where I have platforms I can walk on and bump against on all sides.

View 9 Replies

ActionScript 2.0 :: Sidescrolling Vehicles - Making A Side Scrolling Game?

Jul 29, 2004

hey everyone. im currently making a side scrolling game and its going good. especialy thanx to sum people from here. anyway. i was trying to make it so that u could enter vehicles and then control the vehicles and shoot with them and then u could exit them. Im not asking you to write the code for me. but if u guys know of any examples/tuorials, or if u could giv me sum ideas on how i could do this.

View 1 Replies

ActionScript 3.0 :: Stage - KeyboardEvent - When The Game Ends And I Press Restart, The SPACE Key Is Not Working?

Dec 17, 2009

The problem is: when the game starts, "SPACE BAR" is working fine and changes the game from day to night. When the game ends and I press restart, the SPACE key is not working. On the third time it works, on the fourth not and it follows that way. Every second time that I play the game, the SPACE key doesn't work.

The game initializes the player and sends him as a parameter a stage object and the player listens for KEY_UP.When I press restart, the game runs the init() function again.Below there are the Game.as and Player.as classes.

Code:
package
{
import com.greensock.TweenLite;[code].....

View 2 Replies

ActionScript 3.0 :: Creating A Vertical Scrolling Space Shooter Game For Deployment On Mobile Platforms Using AIR?

Oct 22, 2011

I am in the process of creating a vertical scrolling space shooter game for deployment on mobile platforms using AIR.I've used some excellent tutorials online, video tutorials on Lynda and several books, including Game Programming University.Something they all seem to gloss over are the various screens that will be used.

For instance, my game right now will use a splash screen, a main menu screen, a credits screen,a settings screen, a difficulties screen, an instruction screen, an end game screen and save/load screen...and a play game screen, where the actual game will be played.I've created the screens as seperate frames in the main timeline with stop commands in between and code on each page (I know... bad!... but easy).So basically,they can navigate through the menus using buttons (mouseclicks, which will work with touchs as well) and when they are How do I pass data between them? I was thinking of storing it in shared object.

View 1 Replies

ActionScript 3.0 :: Make A Game, And The Character Inside The Game Could Swim

Jun 13, 2009

I was trying to make a game, and the character inside the game could swim. However, I only wanted him to swim in short bursts that refueled every time he hit the ground.

View 9 Replies

Actionscript 3 :: Make A Game Tutorial Of Flash Game?

Apr 1, 2011

how to make a game tutorial as farmville game tutorial to teach the user to play the game. i have recently involve in make that kind of game tutorial for its user by actionscript 3

View 1 Replies

ActionScript 1/2 :: Tetris Game - Block Go Directly To The Bottom On The Press Of "space"?

Apr 10, 2010

I'm using AS2 and fps120.I'm creating a tetris game, but I encountered a problem: I made a function which makes the block go directly to the bottom on the press of "space".I used

if(Key.isDown(Key.SPACE)){
...
}

But when I pressed space, the blocks stacked up immediately. It's because after I press space, another block apears immediately and goes to the bottom immediately, and keeps going until I release spade. It isn't a problem if I use lower fps, but my fps is 120, which means even I release space as quickly as I could, at least six blocks would stack up. I want to know is there anyway to detect the releasing of "space" or a detection which only detects on the instant I press, instead of when the key is down.

View 3 Replies

ActionScript 2.0 :: Make On Key A - Press A Instead Of Space?

May 24, 2004

This is a code that I have on a movie clip:

onClipEvent(enterFrame){
if (Key.isDown(Key.SPACE)){
_root.acc = 2;[code]....

How do I make on key A - so you can press A instead of Space?

View 3 Replies

ActionScript 2.0 :: Game Pieces To Automatically Get Pushed Off To The Side Of The Other Puzzle Pieces

Apr 11, 2007

I have recently designed a children's educational game that is completed, however; it is a puzzle and the puzzle pieces can be dropped on top of each other and they hide behind eachother which I do not want to happen. I would like the game pieces to automatically get pushed off to the side of the other puzzle pieces that are in use...not stacked on top of each other. The game is complete except for this one problem.

View 1 Replies

ActionScript 2.0 :: Platform Game - When The Mouse Is One Side Of The Screen "player" Flips?

Nov 4, 2010

im working on a shooting game in flash 8, and i am having some troubles. I want to make it so when the mouse is one side of the screen "player" flips and looks at it, and when its on the other, it flips and looks at it.It is what the player does in this game: http:[url]....I want to get the player to act like that when the mouse is on one side.

View 12 Replies

Professional :: Make Character To Jump When Hit The Space Bar?

Aug 10, 2011

how do i make my animation not fall of the stage when i make it move with they arrow keys?also how do i make my character jump when i hit the space bar using actionscript?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved