ActionScript 2.0 :: Shooter Game - Use AttachMovie ,how To Set Its Position On The Stage?

Mar 31, 2011

when you use attachMovie how do you set its position on the stage?

View 3 Replies


Similar Posts:


[CS3] Score Counter In A Shooter Game

Nov 24, 2008

I have a simple shooting game set up. 25 monsters appear on the screen, one after another, until no monsters are left. If you hit one before it disappears, the score increases. If you don't, the score stays the same.

In the actions frame, I placed an empty dynamic text box named score, and set it equal to 0 (declared in the main actions frame). But, seeing as though the monster actions are coded into the library item itself, do I have to declare score, and the score increase there instead?

View 4 Replies

F8 :: Glitchy Arcade Shooter Game

Aug 15, 2009

I've only played around with a dressup and dating sim - and coding using actionscript (and coding in general, only done a little bit of VB and Python before). I've been following a nice arcade side-scroller tutorial on this site which has three parts, if you want to view and go over them to help. It was designed for Flash 5 and I'm using Flash 8 Pro.[code]Anyway, as I was going through and coding/drawing the whole thing I came across a lot of problems and glitches (and a lot of times when the game coding would crash and I'd have to abort it and remake the entire coding again). I sort of stumbled around blindly, deleting and editing code to get things to work, and I'm up to the point where I'm almost finished with the thing. It's still glitchy though.I was wondering if any Flash coders could help me out?I'm going to be creating a Flash game for my programming class and I would prefer if it wasn't screwy (if I need to remake it with less cutesy graphics). xD;; If you could download the .Fla file and fix the coding problems I have.

Playable SWF game on my deviantart account.FLA downloadable file (@ Mediafire; no viruses, trojans, blahblah attached)The enemies tend to randomly explode before the missile has even hit them.The original enemy movie clip doesn't even want to explode.The score counter won't tick for each kill.The boundary box (?) of the player/enemy seems to be too big. You die before you should - in certain positions the enemy gets close and I guess the boundary boxes hit, which initiates the hitTest. It seems premature though, I'm wondering if I can reduce the boundary box, or have it so the enemy and player collide on the actual graphic, and not the movie clip box? I have no idea if this makes sense, I hope it does.There seems to be a bunch of other small glitches too.

View 6 Replies

Memory Leak In My Shooter Game?

Oct 20, 2011

I'm very new to flash,and have been digging through google and this site for information on how to piece together an AS2 shooter game.Its going well enough, but I'm having slowdown issues the longer the games runs, and I was hoping someone here could point me in the right direction.To paste an enemy movie clip on the screen, i'm using this:

Code:
var spawn =_root.attachMovie("monster1","monster1"+_root.getNextHighestDepth(),_root.getNextHighestDepth())[code]........

I need them stored in an array so that the player's shots can test weather or not they've hit any monster on the bullet's enter frame function, then call that monster's movie clip's take damage function. I'm using a for loop to do this:

Code:
for(var i in _root.player.foes){
if (this.hitTest(_root.player.foes[i])){
_root.player.foes[i].takedamage();}
}

I think the problem with the slowdown is that each time I place an enemy on the screen the array gets bigger and bigger. The slowdown only happens while the player is shooting, and I suspect the ever longer for loop with the hit testing is causing it.

I'm already removing the monster's movie clips as they get killed or exit the screen, I guess what I need is a way to reduce the size of the array at the same time, or at least tell the for loop not to do a hit test unless the monster is still alive.

View 3 Replies

ActionScript 2.0 :: Making A Top-down Shooter Game?

Mar 17, 2004

I'm making a top-down shooter game. I have keyboard input that moves the ship around and fires a laser.everything works perfect except that when the ship moves diagonal up left, or diagonal down right, the laser can't fire at the same time. It will work in any other direction, including the other diagonals. Just not those two

[Code]...

is this a common problem among movement in games? or do I just need to fix something?

View 1 Replies

ActionScript 3.0 :: Developing An Horizontal Shooter Game?

Jan 10, 2012

I just started developing an horizontal shooter game, but how can i make enemies ( movieclips ) moving randomly around the screen?

View 1 Replies

ActionScript 2.0 :: Virtual Shooter - Pause The Game?

Mar 14, 2008

I am playing around with the Vertical Shooter by Ernesto Quezada aka _Bruno

link on kirupa: http:[url]....

how can I pause the game.I added a button, but I need the right coding in AS2

View 1 Replies

ActionScript 2.0 :: Make An Overhead Shooter Game?.

May 18, 2011

Im attempting to make an overhead shooter game. Ive got the basic movement down already, and rotation towards mouse. For when he shoots, ive set it to duplicate a bullet movie clip, but i only understand how to set it towards one graphical direction(ex: x +, y -)

The code i know ive gotta fix is

onClipEvent (enterFrame) {
this._x += laserMoveSpeed;
if (this._x>1000) {
this.removeMovieClip();
}
}

The little x + part has to be fixed, but i have no idea what to substitute in order to make it shoot from the front.

View 3 Replies

ActionScript 2.0 :: How To Delay The Fire - Shooter Game

Nov 7, 2004

'm testing functions to make myself a First Player Shooter game and now I have problem with the fire delay. I want a limit of let's say 1 shot per second. I thought that maybe restricting the clickings counted, so it doesn't register the mouse clicks too close to eachother. Or put some kind of interval at the functions delaying the sound and event function, but that seems too hard.

The game so far:[URL]As u see one get multiple sounds when clicking a lot and it's possible to get several points by clicking the ball a lot.Also, when the ball goes behind the tree it's not supposed to be able to shoot. The Flash File: [URL]It's not the exact same, some junk code trying to make the delay...

View 14 Replies

ActionScript 3.0 :: Make A Game That's A Top Down Shooter Kind Of Like Asteroids

Jul 29, 2010

I'm trying to make a game that's a top down shooter kind of like Asteroids, but there are no asteroids, just enemy ships. Anyway, I'm trying to make a radar for it. The area for the ships to shoot eachother in is 2400 pixels length and height. The stage is 650 x 500 pixels. The radar works fine for when I'm traveling up and down, but the enemy ships on the radar move in the opposite direction as the enemy ships on the screen when I move left to right. When I move left the enemy ships on the radar also go right, instead of left.[code]this code is called from a move objects function which is an ENTER_FRAME event if that helps any.

View 8 Replies

Arrays :: Remove Bullets On Collision In Shooter Game?

Nov 24, 2011

I'm trying to create a flash shooter game as my first project. But I can't remove the bullets and enemies when they are hit or off-screen.I've searched for a solution on the problem multiple times and copied about 4 of them (plus I've tried my own ideas) but they are not working.The current method of checking for collisions is:[code]How can I remove the enemies and bullets? removeChild and splice?

View 1 Replies

ActionScript 2.0 :: Fire Delay - Shooter Game - Shot Per Second

Nov 7, 2004

I'm pretty new to actionscript and so but I manage to read and understand and alter other people's code a little. I'm testing functions to make myself a First Player Shooter game and now I have problem with the fire delay. I want a limit of let's say 1 shot per second. How do I do that?

I thought that maybe restricting the clickings counted, so it doesn't register the mouse clicks too close to eachother. Or put some kind of interval at the functions delaying the sound and event function, but that seems too hard. The game so far: [URL] As u see one get multiple sounds when clicking a lot and it's possible to get several points by clicking the ball a lot.

Also, when the ball goes behind the tree it's not supposed to be able to shoot. The Flash File: [URL] It's not the exact same, some junk code trying to make the delay... The file I used for help (if someone finds it useful for making a game of their own [URL] Here u see the target isn't shot behind the pics. Is that because it is a button there and a mc in my file?

View 14 Replies

ActionScript 3 :: Creating Multiplayer Shooter Game For Blackberry Playbook?

Apr 16, 2011

What is a good framework to build a multiplayer game in Actionscript? I want to create a multiplayer 2D shooter like Asteroids on the Blackberry Playbook; my main concern is latency - a shooter wouldn't be fun if the bullets are super-jerky and unexpectedly hit people. I'm guessing that a UDP-based framework would be the best.

View 4 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 :: Vertical Shooter Game On Kirupa Site - Code Error Of If SpriteX -= Steps;?

Dec 21, 2011

I'm trying to work through the Vertical Shooter Game within the tutorials section of this site:[URL]I noticed an code error of if spriteX -= steps; (which should have been += steps)However there are further errors within the tutorial as on page 3 where the man should be able to move and shoot his arrows, mine just shoots his arrows and has stopped moving. I'm using CS5 ActionScript3 to do this tutorial.

//---- variables ----
var steps:Number = 5;
var spriteX:Number = 265;
var spriteY:Number = 265;

[code]....

View 2 Replies

ActionScript 3.0 :: Working On A Basic, Horizontal Shooter Platform Game - Make Enemies Move Smart, Towards The Player?

Oct 3, 2011

i am an newbie as3 developer, and i am working on a basic, horizontal shooter platform game.and my question is: how can i make enemies move smart, towards the player? ( but ofcours you are in able to dodge)so like, an enemy is moving to me so when i am not dodging, it will hit the player.

View 2 Replies

ActionScript 2.0 :: Using AttachMovie To Load And Position MovieClip

Aug 10, 2010

I'm triyng to use the attachmovie command to load and position a movieclip. It doesn't show anything when playing movie. I'm using Flash MX.

_root.attachMovie("Symbol", "mcp", 0);
_root.mcp._x = 100;
_root.mcp._y = 100;

View 7 Replies

ActionScript 2.0 :: AttachMovie - How To Get Y Position Of Movie Instance

Feb 1, 2004

How to get the _y position of a movie instance generated by the AttachMovie method? I'm trying to do something like this.
_root . mc full of attachedMovie instances . one of those clips . _y
The path I'm really using looks like:
_root . text . infoblock4 . _y

View 3 Replies

ActionScript 2.0 :: Use The Attachmovie Command To Load And Position A Movieclip?

Aug 10, 2010

Im triyng to use the attachmovie command to load and position a movieclip. It doesn't show anything when playing movie. I'm using Flash MX.

_root.attachMovie("Symbol", "mcp", 0);
_root.mcp._x = 100;
_root.mcp._y = 100;

View 5 Replies

ActionScript 2.0 :: Overwrite The Current AttachMovie MCs With A New Set Of MCs At The Same Position And Location

Oct 4, 2004

I am using attachMovie function to dynamic attached MCs depending on the database. How can I overwrite the current attachMovie MCs with a new set of MCs at the same position and location after a click on a next button?

View 4 Replies

ActionScript 2.0 ::make A Third-person Shooter Game - "hide" Clip Does Not Receive Any Commands From The Enemy Clip?

Feb 19, 2005

im trying to make a third-person shooter game similiar to those "hide" when you press Down and "attack mode" when you stand Up, sort of like Time Crisis.I've done first person shooter games before.The hero character's move clip contains three clips, one of him in hiding, one in attack mode, and the last being hit. How do I script it such that the "hide" clip does not receive any commands from the enemy clip (which tells the hero clip to advance to "hit" clip and lose a health").

View 3 Replies

ActionScript 2.0 :: Take Button Position Half Width Of Own X Position On Stage

Feb 9, 2011

i want to take btn1 position half wwidth of own x position on stage

View 1 Replies

ActionScript 1/2 :: Using AttachMovie To Add MovieClips To Stage?

Sep 30, 2009

I have a file where movie clips are added to the stage at random time intervals and locations. How do I get pieces of code to effect all the created movie clips? At the moment I'm using attachMovie to add the movie clips to the stage. Once a movie clip is added I want to add three actions to it: the first makes it so that clicking on the movie clip will remove it from the stage, the second makes the movie clip move in a random direction across the stage, and the third makes it so that when the movie clip reaches the end of it's own timeline it performs an action then removes itself.

View 8 Replies

ActionScript 3.0 :: Z Position Impact On Stage Position?

Jan 13, 2011

I have a sprite that I zoom out using the sprite.z property. Once the z property has been modified the sprite x and Y values do not match the stage x and y real value. So far so good and what I was expecting!
 
What I want to accomplish is that when the user clicks the stage the sprite tweens to where the mouse was clicked but I don't know what x and y position to send to the sprite. ( since stage 200,200 is something like 400,400 for the sprite depending on z value)
 
I tried Utils3D.projectVector using Matrix3D of the perspectiveProjection of the stage without success. (i.e. I get Vector3D(Infinity, Infinity, NaN))
 
I could fallback to scalex/scaley but sprites.z gives me the correct scale, perspective projection, paralax scrolling since I have sprites on different z level all for free. I would have to recode all that.

View 5 Replies

ActionScript 3.0 :: Set That Movieclip X And Position According To Stage Position

Nov 3, 2009

lets say i have a sprite on the stage and one movieclip inside it. now i want to tween or just set that movieclip x and/or y position according to stage position. so for example i want to set mc.y = - 100; (by which i mean -100 to stage, not sprite which mc is in.)

View 2 Replies

ActionScript 2.0 :: AttachMovie - Add Movie Clips To The Stage

Nov 1, 2009

I want to add 5 movie clips to the stage. The movie clip at this point is just a red box and called testMovie. Ultimately i want to have 5 red boxes displayed on screen tiled vertically one under the other. Here's the code i have so far:

[Code]...

View 7 Replies

ActionScript 2.0 :: AttachMovie Below Stage Elements On Timeline?

May 1, 2008

I did some searching and it looks like elements that are on the timeline are added at the lowest possible depth first and in increasing order. I want to attach a movie clip, but I want it to be behind elements that are on the timeline. How can I do that if timeline elements are already as low as they can go?

View 3 Replies

ActionScript 2.0 :: Put Movie Clips On Stage Using The AttachMovie Command?

Jun 10, 2002

how to put Movie Clips on my stage using the attachMovie command, but they always appear in the upper left corner of the screen. How can I get them to appear in a predetermined area of the stage, without having to edit the Movie Clip itself?

View 1 Replies

ActionScript 2.0 :: Position A Movieclip In The Middle Of The Stage Even If The Stage Or Window Resize?

Feb 27, 2006

i saw a thread while ago .. that always position a movieclip in the middle of the stage even if the stage or window resize any1 can point me to it

View 3 Replies

ActionScript 2.0 :: Refer To The Button Inside The Movieclip After Attach It Onto The Stage Using AttachMovie?

Nov 17, 2003

I had a movieclip which contained a button in it exported as "mc". Then I attach this movie clip onto the stage using: _root.attachMovie("mc", "link1", 1); But i couldn't find it with AS. I mean, how can i refer to the button inside the movieclip after I attach it onto the stage using attachMovie?

View 2 Replies







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