ActionScript 2.0 :: Bullet Shooting Thing Which Shoots Bullets

Apr 2, 2007

I have like a bullet shooting thing which shoots bullets (obviously), and it sorta rotates around a point and fires at a movie clip. At the moment the bullets move outwards because of a animation in side the bullet movie clip, but how can I make them move outwards and away from the thing that fired them using actionscript?

View 8 Replies


Similar Posts:


ActionScript 3.0 :: Shooting Multiple Bullets - Press The Space Bar The First Bullet Disappears And The Bullet Animation Starts Again

Nov 24, 2008

I'm trying to make my platform game character shoot a gun, my character and gun are one movieclip and the bullet is another. The bullet mc starts on a blank frame with a stop() function, when I press the space bar the bullet mc plays from frame 2 which is a motion tween of the bullet quickly moving across the page. I've set the bullet's y and x values relative to the character mc so that the bullet always comes from the gun.

My issue is that if I press the space bar a bullet will fly out of the gun (great!) but if I press the space bar again, the first bullet disappears and the bullet animation starts again. I want to be able to shoot a new bullet every time I press the space bar without effecting the bullets that have already been shot.

[Code]....

View 3 Replies

MX Shooting Bullets In Any Direction?

Jun 28, 2011

I need a code in AS2 that launches a bullet ("bullet") from the character ("hero") towards wherever you clicked the mouse.For example, if I click somewhere, I want the bullet to launch straight towards where I clicked.

View 10 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 3.0 :: Setup Bullet Factory/bullet Switch For The Same Player Object?

Mar 25, 2011

I'm currently making my own shoot'em up game where the player can switch  between two player types which will fire their own bullet type in this  case, squares and circles. I've setup the player switch function via  pressing "space" button (switching between the two player types) and the  default bullet type is "squares" and I'm not sure to approach the  coding with changing the bullet type to "circles".I've written 2 classes for the bullet and player setup:Player Class: Creates instance of bullet on screen and enables the switch player type function

Bullet Class: Enables bullet properies and bullet types Player Class: Code:function onKeyDown(event:KeyboardEvent):void {if (event.keyCode == 32) //// pressing/holding "space bar" to function

[code]....

View 5 Replies

ActionScript 3.0 :: Set The Bullet.x To Ship.x In The Bullet Class?

Oct 4, 2009

i have 2 classes, one for ship one for bullet.i was trying to set the bullet.x to ship.x in the bullet class but it keeps telling me undefined. but clearly it is in my ship class.

View 10 Replies

Actionscript 3 :: Rotates Towards The Mouse And Shoots?

Apr 22, 2011

I am pretty new to action script 3 (I did a little bit in as2) and i am trying to create a laser gun that rotates towards the mouse and shoots when the mouse is fired.

kind of like this but in as3[URL]..

View 4 Replies

Actionscript 3 :: TLF Shoots Error When Used Inside A SWC?

Mar 12, 2012

I created a SWC which is a simple MovieClip that contains some TLF text fields. I have embedded the font using the Flash Professional IDE. When instance this Class in my main app

var myInstance:MovieClip = new SomeClass() as MovieClip

I get a Type Coercion error call:

Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@1fbcc271 to fl.text.TCMText.

View 1 Replies

ActionScript 3.0 :: How To Get Timer That Shoots Multiple Functions

Feb 26, 2009

I really need a Timer that shoots multiple functions. The Timer Class just handles one function and therefore is not good enough for my project. The Timer should work something like this:

After 1 seconds fire functionOne
After 4 seconds fire functionTwo
...and so on...

Time is really crucial in my project (down to milliseconds) so I really can't use the Timer Class and fire "new" Timers all the time because Flash needs some milliseconds to process all the code and in the end it sums up to kind of a lot of time.

View 7 Replies

Flex :: Event - Shoots Out When All The Operations In A Mx:state Tag Are Done?

Aug 28, 2010

Let's take the next example:

<mx:State name="sayHello">
<mx:SetProperty name="preText" target="{this}" value="Hello"><mx:SetProperty>
</mx:State>

Can I somehow know when preText property has been set to hello?

[Code]...

View 1 Replies

Create Blow Darts Which The Player Shoots?

Nov 7, 2011

In my side-scrolling game, I am trying to create blow darts which the player shoots. Of course, I want the darts to start where the Player is and then the darts move in their directions.

However, I have a problem. In my game I use a scrolling function that places the player right in the middle of the screen. Here is that function:

[Code]...

View 1 Replies

ActionScript 2.0 :: Fps Game: Goto After 5 Shoots Or 20 Seconds?

Mar 14, 2006

I'm working on a simple first person game - converting it to a banner ad.I'd like the timeline to move to an end game frame after 5 shoots or after 20 seconds -how the script below controlling the game can be modigied to achieve this?

Code:
var i;
// gunfire sounds

[code].....

View 1 Replies

ActionScript 3.0 :: Sling Or Catapult - (Drag On The Ball Release It And Its Shoots)

Feb 4, 2010

I want to make a basket ball. Drag on the ball release it and its shoots far depending on how far you drag it back.. Anyone have a quick code to share?

View 8 Replies

ActionScript 3.0 :: Shooting A Target?

Apr 24, 2009

I have a monster_mc that shoots a bullet_mc at a target_mc.When I click the Keyboard.RIGHT the bullet jumps once then hesitates or pauses then continues -=25 pixels, instead of shooting smoothly.Am I missing something here?, can I make it perform better?

stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
target_mc.stop();
function keyPressed(event:KeyboardEvent):void[code].....

View 1 Replies

ActionScript 3.0 :: Shooting In Different Directions?

Sep 16, 2010

I have been googling my butt off I can not find anything about AS3 and shooting in different directions.

I just need to shoot in the direction my char is facing.

I have this so far which work flawlessly ;-)

function Shoot(event:MouseEvent):void { trace("shoot");}

oh also I can get the direction my hero is facing using trace "character_mc.rotation"

View 3 Replies

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

ActionScript 3.0 :: Shooting In Same Direction As Character?

Feb 15, 2010

I'm making a game that is birds eye view like the old grand theft autos. anyway im currently stuck at this... I can have my character fire and have the bullet follow my mouse but I cant seem to figure out how to just make the bullet go straight off the screen in the direction my character is facing.

View 2 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 3.0 :: Shooting In Same Direction As Character

Sep 20, 2010

I'm making a game that is birds eye view like the old grand theft autos. anyway im currently stuck at this... I can have my character fire and have the bullet follow my mouse but I cant seem to figure out how to just make the bullet go straight off the screen in the direction my character is facing.

View 8 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 1/2 :: Shooting Works Only When Jumping Not Standing?

Jan 23, 2012

I'm having trouble getting my character to fire. it seems to fire when he jumps, but not while standing. I have attached my code to the zip file below:This is the code I used:

onClipEvent (load) {
var gravity:Number = 0;
var speed:Number = 5;

[code]....

View 1 Replies

Flash :: Shooting One Arrow Per Click Towards The Mouse

Aug 23, 2011

i am looking for a tutorial to help me with shooting one arrow per click towards the mouse. this is my code:

[Code]...

View 1 Replies

Actionscript 3 :: Shooting Projectiles Given An Angle And Power?

Dec 31, 2011

I'm doing a prototype game like Worms and I would like not only to shot, but also see the whole projection curve where my shot will travel before it hit the ground. The only information given by the player is an angle and a power. There is also some level elements like wind and gravity.

Can I have a code for the projection curve? its like a parabola I think. I research about parabola but I had some difficult to apply these math formulas into the programming code.

View 1 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 :: How To Create Bullets

Mar 8, 2010

how to create bullets in as3? I have a main character = hero.mc Basically I need to store the bullets in an array and have them firing from the hero. It sounds simple enough, but for some reason I can't get it to work.

So far I have this:

Quote:

private var bullets:Array;
public function createBullets() {
bullets = new Array();

[code]....

View 15 Replies

How Add Bullets To Flash Text

Jan 11, 2007

How do I add a bullet to Flash text? I know that alt0149 isthe html code. In the Flash text box and before the first textcharacter, I tried pressing the ALT key and simultaneously typingin 0149. Nothing happened.A similar question was asked on this forum... the answer wago to the Character Map (where is that) or use dynamic text (Itried putting alt0149 in the dynamic text box ??? but it didn'tork).My work-around so far is to copy a similar bullet and add itto the text box. But there must be a quicker way.

View 7 Replies

ActionScript 1/2 :: Bullets Only Shoot 1 Way?

Mar 4, 2012

this is in my bullet movie clip on the timeline.[code]It all works but when i turn around it still shoots the same way im sure its something simple but i just cant work it out.

View 7 Replies

Flex :: List Bullets In 4.5?

Jul 27, 2011

Is it possible to add bullets to a Label in Flex 4.5 mobile development?something like this:

.Item
.Item
.Item

View 3 Replies







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