ActionScript 2.0 :: Make Bullets Shoot When Space Button Is Releases?

Feb 15, 2003

I have just read the tut on the shooting aspect of games and i tried it for myself. I altered it so that you shoot on the x axis and you shoot when the space button is pressed.My question is, how do you make the bullets shoot when the space button is releases? And or can make the bullet shoot at an interval of one second or so when the space is pressed... The bullets for me are shooting at a continuous streem and that may be a too great advantage for a user..

View 6 Replies


Similar Posts:


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

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

ActionScript 2.0 :: When The User Releases The Mouse Button, The Timeline Should Move To The Specified Frame?

Jul 14, 2010

I'm building up a site in flash CS4 using AS2.i have a movieclip that acts as a button where it displays severall other movie clips inside of it, for example mc1, mc2, mc3; I'm trying to set a value to a variable that tells me at the time the end user presses it which movieclip is playing.I've done this by adding: var cb = "sp"; on the first frame of each movieclips (mc1 stands for "sp"; mc2 stands for "te")

On the main movie clip, they are displayed sequentially, so on my perspective, when mc1 starts, the value of the variable cb should be set to sp. That way, when the user releases the mouse button, the timeline should move to the specified frame.Here's the code I have for the Mouse event:

bannermiddle.onRelease = function() {
if (cb == sp) {
bannermiddle.gotoAndStop(3);[code]........

I've had the trace to the code so I could see if the value is correctly set, but it keeps showing undefined...

View 4 Replies

ActionScript 2.0 :: Make A MC Like Shoot A Gun / Something When You Press Spacebar?

Aug 13, 2004

How do you make a MC like shoot a gun or something when you press the spacebar?

View 1 Replies

ActionScript 3.0 :: Undefined Addchild - Make A (missile) Upon Shoot?

Nov 23, 2011

THIS THREAD IS SOLVED.. Answer lies upon a website tutorial. Final Page on this Thread.So far so good, i've gotten most my as2 to as3.. And coming out good Buttons are working, The only last part im working on is upon shooting, it'll bring in the calls to Fire the missle.. (tracein the button works great).

[Code]...

This is what im trying.. But it says undefined use for addchild.. so im taking im missing somthing..

(the missile is a animation graphic i created).I have made a Missile.as to control what the missle does when its addchild is placed on stage. Problem is, (addchild isnt doing it) and im not sure if its going to shoot out the nose of the hero..

View 14 Replies

ActionScript 2.0 :: Make A Bullet Hole Appear When Shoot An Object

Sep 28, 2002

i've posted many times and got loads of responses but i dont understand how to make a bullet hole appear when you shoot an object. MSN me a [URL] to have a chat about doin the actionscript.

View 1 Replies

ActionScript 2.0 :: Make The Person Shoot When Press The Spacebar?

Mar 16, 2005

I havent used flash in years and I wanted to make a game. Ive made a few before but i didnt ever finish them and now i dont have them anymore. I wanna make this game where you are this man that can move around. (i can remember how to do that) and you shoot these huge exploding cats. How do i make the person shoot when you press the spacebar?How do i make the barrel of the gun follow the mouse and the bullets shoot that way?

View 10 Replies

Flash :: Make A Bulleted List In Custom Bullets?

Nov 20, 2009

Is there a way to make a bulleted list in flash with custom bullets? If so, can this be used from within a TextArea in Flex (mx.controls.TextArea) when setting htmlText?

For example:
<li>Item</li>
<li>Item</li>

The list above will render fine when set into a TextArea using htmlText (versus just setting the text property). The rendered text will have standard vanilla bullets. Is there a way to style these bullets with custom images, like you can in standard HTML/CSS?

View 4 Replies

ActionScript 3.0 :: Why Is Toggle Function Calling For 2 Press/releases

Apr 29, 2011

the button that i am using is needing to be pressed twice in order to execute properly. I would like it to function on the first press. Here is my code:

btn_radio.addEventListener(MouseEvent.MOUSE_UP, ToggleRadio);
// if you want a hand cursor btn_radio.buttonMode = true;btn_radio.useHandCursor = true
function ToggleRadio(myEvent:MouseEvent) { if(!btn_radio.toggle){ 

[code].....

View 4 Replies

Professional :: How Soon Adobe Releases Debugger Version Of Flash Player?

Jul 21, 2010

Does Adobe have any policy/trend to release debugger version of Flash Player along with the regular release versions?

View 1 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

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

ActionScript 3.0 :: Make A Space Warp Effect?

May 26, 2010

It's possible make a space warp effect like this: [URL]

View 0 Replies

ActionScript 2.0 :: Make The Flash File Think That The Space Bar Is Down?

Apr 9, 2006

can you use AS to make the flash file think that the space bar is down??? ive tried this code

Code:
onLoad = function () {
sd = 21;[code].....

View 3 Replies

Professional :: Make An Infinite Loop With The Same Space On All Images?

Dec 22, 2010

I made a movie clip with infinite  loop in which there are images that move from right to left something simple like a marquee, and each image has a blank space between  them, but between last and first image there is a more space, how I can do to  make all images have an equal space between each one and that the motion never stops.

View 5 Replies

ActionScript 2.0 :: Make A Space In Dreamweaver Where People Upload A Picture?

Feb 4, 2009

I want to make a space in dreamweaver where people can upload a picture, the picture then stays there for that particular person as ,lets say for example a 'cookie', can i make this in flash sing as2 or can i do it in dreamweaver, i have added a simple picture showing what i would like.

View 0 Replies

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

ActionScript 2.0 :: Make Work Space Area Bigger In Flash MX 2004?

May 11, 2005

how can i make my work space area bigger in flash MX 2004?

View 2 Replies

Flex :: Have A Button Not Fire On Space Key If It Has Focus?

Jun 11, 2009

The behavior I'm trying to prevent is after a user clicks on a button, the button retains focus, and then if the user hits the space key, the button fires again. So I thought it could be solved either by setting the focus elsewhere, or by having the button ignore the space key. I've tried adding the following keyDown event listener on the button, but it didn't work.

private function btn_keyDown(event:KeyboardEvent):void {
// try to ignore spaces, i.e. don't click on SPACE when it has focus
if (event.keyCode == Keyboard.SPACE) {
}
}

I tried changing focus by doing the following, at the end of the function that's called when the button is clicked:

stage.focus = parent;

View 5 Replies

ActionScript 2.0 :: Button System In A Space Of Time?

Jun 18, 2009

I need to do a button system with 8 buttons. I need that only one be visible for each space of time of the month.

Example:

Button 1 - day X to day Y
Button 2 - day Z to day W..
(...)

View 1 Replies

ActionScript 2.0 :: Size And Resolution - Make A Stage Adapt To The Browsers Viewable Space

Apr 19, 2007

is there any good tutorial on how to make a stage adapt to the browsers viewable space, with everything inside visible and with the correct size, not distorted? maybe a list of things needed to make it possible like the kind of layout?

View 9 Replies

ActionScript 2.0 :: Button Size Increase, While Other Buttons Slide Over To Allow Space?

Sep 21, 2006

I have a line of 12 horizontal placed buttons. I want whatever button is rolled over to get larger (no problem), but I need the other buttons to slide over to allow for the new size that the larger one would bring. I have no idea what type of code I should be looking for here.

View 1 Replies

ActionScript 3.0 :: Get A Button To Toggle Playing Or Stopping A Mp3 If Click It Or Hit The Space Bar?

Feb 26, 2010

I'm trying to get a button to toggle playing or stopping an mp3 if I click it or hit the space bar. The code I have does that but it does something funny I don't understand. This is the code:

var s:Sound = new Sound(new URLRequest("song.mp3"));
var sc:SoundChannel;
var playtggl:int = 1;

[code]....

As you can see I've added two event listeners on the button, one for the mouse and for the spacebar. Thing is everytime I hit the spacebar, my function for the mouse click fires up. I don't understand how this is happening.Also, how do you have the event listener listen for a spacebar event without having to first focus on the button by clicking it with the mouse?

View 2 Replies

ActionScript 3.0 :: Make The Content Assist In Flex Builder To Pop Up As Soon As Start Typing And Not Just After Pressing CTRL+SPACE?

Aug 31, 2009

Is it possible to make the content assist in Flex Builder to pop up as soon as I start typing and not just after pressing CTRL+SPACE? It does pop up by itself after a '.' (foo.) or a ':' (var foo:). But to get a list of available variables and methods I have to press CTRL+SPACE.

View 4 Replies

ActionScript 3.0 :: Shoot An Moving Object Exactly In The Center?

Dec 5, 2011

I have a TargetCirlce_mc which moves on "y" axis from top to bottom. And I have an arrow_mc which is on x:100 & y:200. How can I shoot an arrow exactly on the registration point of the TargetCircle_mc (automatically) while it is exactly opposite to the arrow_mc?

View 1 Replies

Flash :: Event Flow In AS3 - Shoot A Bullet?

Aug 11, 2011

My goal is to shoot a bullet everytime I click on ship. What happens, in fact, is that If I click on it once, the bullet is shot, but if I click on it twice before the first bullet is off the screen, the first bullet literally stops(it does not disappear, only stops) and the second bullet is shot.

public var ship:Ship = new Ship();
public var bullet:Bullet = new Bullet();
stage.addChild(ship);[code]...

View 2 Replies

ActionScript 3.0 :: Character Movement And Shoot Not Working?

Nov 8, 2009

I'm doing a simple game where you move the character using the arrow keys and shoot using the Mouse. The character rotates based on the Mouse angle. I have two problems: when I move the character, he moves once, then stops then moves again as normal. My other problem is that when I click over a MovieClip, the bullet goes to the wrong angle.My moving function:

Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler);
function keyHandler(event:KeyboardEvent):void {

[code]....

View 2 Replies

ActionScript 1/2 :: Get To A Certain Distance Of The Enemy It Should Trace (shoot) - Won't Work

Aug 5, 2011

what i whant is when any of the units get to a certain distance of the enemy it should trace(shoot).

[CODE]...

View 6 Replies

ActionScript 2.0 :: [mx] Create Shoot Lasers From The Nose Of The Plane?

Feb 8, 2003

I'm working on a new project, its a side scrolling game where an airplane (user) has to shoot down a bunch of other enemy planes. how to create an AS to shoot lasers from the nose of the plane

View 6 Replies







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