ActionScript 3.0 :: Flash Background Movement For Shooting Game?

Aug 30, 2011

I'm doing the shooting game. In that character should move left and right by using the arrow keys. The background is movieClip with image. The character is walking very slow sometimes. And the zombies will come automatically. Why the movement is very slow sometimes?

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Shooting Game In Flash CS3?

Feb 6, 2009

Shooting game in FlashView Game - Click hereKindly check game codeProblem:1) The rabbit should be random shown in ground areaif someone can give explaination onmonster.x = Math.random() * stage.stageWidth;and why the rabbit is showing bigger size?2) Other animals should also be able to target

//----->
stop();
var monstersAlive:uint;

[code].....

View 1 Replies

Create A Shooting Style Game?

May 7, 2010

I am at uni and have a project to create an interactive game for the story Johnny Mnemonic. I would like to create a game whereby the player has a whip type weapon, there is an opponent jumping up and down and with the whip you attack them and cut off limbs -

I'm thinking it would be like a simple shooting ducks style game in terms of coding, the player has visible just a hand with the whip in it, you move the whip to your desired location click chosen button to hit, the whip then animates a flick, if it hits correct spot on bouncing opponent then an animation of the limb flying off happens, so the bouncing opponent is like the duck and the whip like the gun - if that is right at all?

View 1 Replies

ActionScript 2.0 :: Top Down Shooting Game - Boundaries

Nov 23, 2005

I've been making this space shooting game but I'm having problems getting boundaries to work. I've read tutorials and done lots of searching here and couldn't get anything to work... On the main time line, there's 2 layers. One with the ship, and one with the background (both are movie clips). Inside the background movie clip, I'd like to add boundaries, almost as complex as a maze but not so restricting.. as in, a path to fly through that'd probably be as wide as the screen itself. Here's what I'm trying to work with. Use the arrow keys to move, space to shoot, and press control to toggle between fixed camera and fixed ship modes.

View 1 Replies

ActionScript 2.0 :: Shooting Game Bullet Removal?

Feb 18, 2009

So the problem is basicly this: It all works just fine, but when the bullet hits the target it gets destroyed (this is ok) but also any bullet that was shoot before it (meaning also: with a lower y) gets destroyed aswell wich is anoying. Here's the code (left the comments so you can find your way around easier)

Code:
stop();//add a stop function too!
enemyspeed =1
life=3
var gameOver:Boolean = false;

[Code]..

View 2 Replies

ActionScript 2.0 :: CS3 Shooting Game Missile Flaw

Jul 15, 2010

I'm making a Space Invaders-type game. Y'know? Arrow keys to fly Space to shoot? Well, shooting isn't working so well. I have two .as files: Ship.as which controls the ship's ActionScript, and Missile.as which is supposed to control the missile. When I hit load it up I get the error: The class or interface 'Missile' could not be loaded.

View 2 Replies

ActionScript 2.0 :: Create 2d Platform Shooting Game?

Feb 13, 2011

I am creating a 2d platform shooting game. Currently I have my main character walking around left and right and the stage background also moves left and right.

The problem I am having is that if I go to far left the charater just walks 'off stage' and into nothingness but the stage still follows. How can I make it so if the character hits a certain point he just 'stops' and cant go left no more but can go right no problem. I have tried using hitTest with another movieclip but couldnt get it working.[code]...

View 1 Replies

ActionScript 2.0 :: Shooting In A Game-megaman Style

Apr 4, 2002

Ok I am creating a 2d game similar to the original mega mans and mario for nintendo. The character moves back and forth using the left and right arrow keys on the screen and has a walk animation and all. The next step is to get him to shoot his laser gun. I want this to be done using the space bar key. What I have right now is identical to Kirupa's movement using X and Y values tutorial but it only moves one direction of course. How can I make it so that it will continue to move automatically after pressing space instead of having to hit the space bar each time I want it to move 10 units over etc.?

View 12 Replies

ActionScript 3.0 :: Target Shooting Game - HitTestObject Not Working

Mar 22, 2011

I'm making target shooting game and the hitTestObject not working its located in the function collision detection below in my code:
import fl.motion.MotionEvent;
import flash.events.MouseEvent;
var xSwitch:Array = new Array ;
var count:Number = 120;
var seconds:Number = 0;
var minutes:Number = 0;
[Code] .....

View 1 Replies

ActionScript 2.0 :: Making A Shooting Game, Would Like The Gun To Flip _xscale?

Jun 2, 2008

I'm making a shooting game, would like the gun to flip _xscale when you move the gun past half the width of the stage. Here's the script I made which doesn't work and is probably not written correctly:

if(_xmouse >= Stage.width/2){
_root.gun_mc._xscale * -1;
}

View 4 Replies

ActionScript 3.0 :: Passing Function Parameters: Shooting Game 85% Done?

Dec 2, 2009

I have benn programming in AS2 for a while, but I'm moving to AS3, and I'm having some trouble with syntax and mostly with management of parameters and variables (actually I tried to work with functions in packages without good results T.T). The game has four different types of shooters, and all of them use the same bullet (shoot function). I have succeeded on disappearing the target (a coin in this case) when it is hit by the bullet, but the problem is that I can't quite find the way to dissapear the bullet properly. I keep receiving this message:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at eco_adm9_fla::MainTimeline/moveBullet()

[code].....

View 3 Replies

ActionScript 2.0 :: Shooting Game - A Gun To Follow The Player, But The Coordinates Are Messing Up And Going To His Feet?

Oct 25, 2010

I'm making a flash game in AS2, and i am having troubles with my gun, i have fiddled with it for a while now and i have narrowed down the problem, but i can't fix it. My problem is that i want a gun to follow the player, but the coordinates are messing up and going to his feet.

Code:
onClipEvent (enterFrame) {
_y += (_root.player._y-_y)/1; //This code makes it goto his feet, but the gun no longer follows player when he jumps.
_x += (_root.player._x-_x)/1;[code].............

View 1 Replies

ActionScript 2.0 :: Simple Vertical Shooting Game - Rebound Missile Always Spawns At Left Of The Stage?

Feb 6, 2011

Basically, I have a border(line) at the top of the stage so that whenever my ship's missile comes in contact with this line, it is removed and a rebound missile clip is attached.Here is the missile code:

Actionscript Code:[code].....The problem is that the rebound missile always spawns at left of the stage, not wherever the ship missile was removed.I'm not sure if I should attach the fla, action script files, swf etc. to the thread. Also, my flash version is CS5.

View 3 Replies

Actionscript 3 :: Flash Game Ai - Path OR Automatic Movement

Aug 16, 2011

I am creating a flash game and I've hit a problem I have four objects, lets call them img1 through img4 I need them to move around a maze, witch is made up of blocks (maze.wall.block1 to block53) I have seen tutorials on creating a path however these all involve the object to be added to the stage, where as I am doing it in a as3 class. So my question is either: How can I create a path manualy on the stage, then create an object to follow the path in the as3 class, OR how can I add very simple ai to the img object to move around but change direction when the hitTestObject triggers on the maze.wall.blocks?

View 1 Replies

ActionScript 1/2 :: Adobe Flash CS5 Platform Game Movement With Arrow Keys?

Sep 9, 2010

I am a beginner to flash gaming. I am making a platform game, but  can not reverse my character when he goes backwards. This is my code for left and right: if (Key.isDown(Key.RIGHT)) {_x += speed;} if (Key.isDown(Key.LEFT)) {_x -= speed;} How Can I reverse it so when it goes LEFT, the character turns all the way around?

View 4 Replies

ActionScript 2.0 :: Keyboard Movement - Get The Characters In Flash Game To Move Diagonally

May 7, 2005

I'm trying to get the characters in this Flash game to move diagonally - it works, but the following occurs: The character is walking twice as fast as it does when going left, right, up, downThe walking animation doesn't play PHP Code:

[Code]...

View 11 Replies

ActionScript 2.0 :: Flash Game Scrolling Background?

Jan 21, 2009

I'm trying to make a game where the character stays in the middle of the screen and the background scrolls as the arrow keys are pressed.

I've got it moving fine, but the background scrolls off the stage when you reach the edge. The background's bigger than the stage. I want to stop the background moving before this happens.

View 14 Replies

IDE :: Leg Movement Conditional Statement For Game

Oct 26, 2009

I have a character in a game that moves in accordance with keyboard commands.. I'd like to have it so that when the character moves on the stage his legs simulate walking. Meaning.. when moving right, his legs rotate counter clockwise. But since there are two moving at the same time, one moves forward to a point while the other moves back to a point (the legs don't circle over his head), I need a conditional statement that indicates that when his leg's rotation is greater than 149, it reverses direction until its at a certain point, then moves back.. The below code is for one leg.

addEventListener(Event.ENTER_FRAME, onLoop);
function onLoop(evt:Event): void{
if (Bear.Leg.rotation >=149){
Bear.Leg.rotation -=1;}
else {Bear.Leg.rotation +=1;}

I know why this doesn't work, it passes 149 and then moves back until it's below 149 and gets stuck in a loop. I need it so that the first statement gets overrided then flips back to it later. How can I do this?

View 2 Replies

ActionScript 2.0 :: Mouse Movement Background?

Feb 8, 2009

I am doing a website where the background is moved with the mouse horizontally. I want it with a edge size ti avoid too much movement when the mouse is in the middle of the stage.

var mousePositionX:Number = 0;
var speedX:Number = 0;
var edge:Number = 100;[code]...

View 7 Replies

ActionScript 2.0 :: Character Movement Script For A Game?

Apr 15, 2010

I'm sorry if this is the wrong section. But I'm looking for help with my actionscript coding. I'm fairly new to Flash. I've only scripted some simple websites so far and this is the first time I try to make a flash game. I started yesterday but I'm already having problems with my script.

I have a scene with 2 layers: one with my character and one with the bounds (ground, ceiling and walls).

Inside my character movie clip, I have this: Which is basically a bunch of frames labeled and with the action to stop();. Each one containing another movie clip with the respective animations. So the idea was, when I press "A", jump to "walk left". And it kinda worked, but I have some problems and I'm not really sure how to solve them.

[Code]...

View 2 Replies

ActionScript 3.0 :: Animate A Characters Movement In A Game?

Dec 13, 2010

Im using Actionscript 3.0 and Adobe flash professional CS5 Im trying to animate a characters movement in a game im designing..Theres 8 differnt instances im going to use for the movement, I decided this upon studying NES zelda and finding his character only has 8 differnt instances for his general movement. See I want the graphics to be pixelated, just like the old games~ I like pixel games.

for example:Whenever I press the LEFT ARROW key I want two instances to switch back and forth between eachother to animate movement, and so I want it to keep doing that until movement is stopped~ as goes the same with the UP, DOWN, and RIGHT arrow keys.

View 2 Replies

ActionScript 2.0 :: Game Enemy Movement And Interaction?

Mar 17, 2008

I'm relatively new to creating games, however I've been a flash website developer (and designer) for over 7 years, and am used to OOP and AS2 Event-based programming. It was a bit tough to swallow the one-global function runs everything method but it all seems to be going fine now. The only problem I'm having right now is my math, and character movement and interaction.Also figuring out hitTests when the player punches, seeing as how you might have multiple hitTests be true, yet I want only those in the front row to receive damage.

Here's what I'm working on: http:[url].....

What I would like it to do, is for the enemies to swarm, but not walk "through" each other.Because the player only has his fists to defend himself (stipulation of the game unfortunately), they need to start far away, but then come up to the player's range and then mosy about in front of the player, jabbing him from time to time. The only thing, is that currently they look like paper dolls, because they move through each other, and the movement isn't very good either. This will allow the player to punch away their health until theirs none left, starting the new wave. my first big problem is the enemy movement and interaction with each other in a simulated 3d environment.The second would be how to get the player to deal damage to them, how can you tell that he punched the guy in the front row, etc.

View 3 Replies

ActionScript 2.0 :: Restricting Game Character's Movement?

Aug 9, 2010

1. How do I prevent my scuba diver from leaving the screen? As when i hold either up, down, left or right long enough he will leave the stage entirely.2. How can I make my sharks enter the screen at random rather than having them enter from the same position each time? Here is my code:

(FOR MY SCUBA)
onClipEvent (load) {
xspeed = 10;

[code].....

View 3 Replies

ActionScript 3.0 :: Background Movement Associated With Mouse Dragging?

Nov 16, 2009

[URL]. I am curious how I can achieve an effect like this. More specifically the background movement associated with dragging on the mouse. How is the image constucted? Is it a large circular image?

View 3 Replies

ActionScript 2.0 :: Background Movement - Incorporate The Same Effect?

Nov 1, 2005

I am trying to incorporate the same effect as this. How is it done? Thank you~

View 3 Replies

ActionScript 3.0 :: Efficient Background Movement - Left And Right?

Oct 19, 2009

I'm working on a game and I want the background of the game to move or the view of it at least. I know that it is possible to create the image and have it move left and right, but for larger images this can create lag since it's moving such a large movie clip. If I were to use a mask the size of the viewing window, would it keep the whole background from being drawn and save on processor? Is there any other method for handling this efficiently?

View 2 Replies

Actionscript 3 :: Improve The Realistic Movement Of The Pool Game?

Dec 15, 2010

Here is my pool game engine done in Box2dFlash.I would like to make this simulation more realistic as I received mixed opinion from pool experts.Here is my standard wall setting:

var leftWall = _sim.addBox({x:0.9, y:8.15, width: 0.6, height: 11.5, density: 0, fillAlpha: wallAlpha, lineAlpha: wallAlpha});

And of the ball:

_solidBall_7 = _sim.addCircle({x:ballPosX - (ballRadius * 5) - 0.8, y:ballPosY, radius:ballRadius, density: 0.1, linearDamping: 1, isBullet: true, restitution: 0.7, angularDamping: 5, skin: Solid_Bordo});

What other params I might try to improve the realistic movement of the pool game?

View 1 Replies

ActionScript 3 :: Isometric Grid Movement For Object In Game

Mar 4, 2011

I am currently creating a game similar to cafe world, farmville etc (social game). Would like to know how could I make an object move in an isometric direction when my mouse move. For example, when I want to build a house, I click on the house build button, and when my mouse move, I want my house object (stored in the library) to be move together with my mouse in an isometric direction. To give you all a better impression of the solution i am looking for, click on this link for a sketch: [URL]. So I want something like only when my mouse move 20 units more than the original mouse position, then my house item should move to the next grid.

View 1 Replies

ActionScript 3.0 :: Character And Background - Creating Illusion Of Movement

Mar 12, 2009

Right basically I have a character and a background. The background scrolls as you press left or right on keyboard to create the illusion of movement. I want the character to flip when you change from holding down left to right and vice versa, but when I do the following code it doubles the size of the character once and then it stays. It flips fine but in the transformed fat size.

Here's the code:
var mySpeed:Number = 10;
function keyIsDown(evt:KeyboardEvent):void{
if(evt.keyCode==Keyboard.RIGHT){
walkingPlane_mc.x+=mySpeed;
greyCharacter_mc.scaleX=-1;
[Code] .....

View 4 Replies

ActionScript 3.0 :: Puzzle Game : Movement Of Tile With Mouse And Snap?

May 4, 2011

I trying to make a game like Chicken Get Home.There a different type of levels in the game by arranging the tiles. I made the levels in the art and exported the array value by using mappy. ** How can we use the array value in our code and how to import those levels in the code
** How to move the tile with mouse only to blank position(ie like snapping to next tile)..

View 1 Replies







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