Take a look at this scenario, I have two characters, one shoots two bullets on the direction of the other character, the bullets are fired instantly and travel at infinity speed, how to detect a collision? Here's an image to illustrate the problem: The red bullet would clearly miss, but the green bullet would hit, how to perform this kind of collision test?
how i can make a collision between a bullet, a club and a helmet.i have the shooting in the bag but i need to know how i can do this.when the bullet is shot if it hits the club i want the bullet to be destroyed.if the bullet hits the helmet i need the game to go to the next scene.
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
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.
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.
As flash professional does not have support of flash player 11 while testing project with ctrl+Enter, I can only test flash projects in browser so I cann't use trace to check things working, and I can't event integrate monster debugger in starling object, it does not trace anything. Does someone have solution for this, I mean how can I test flash project in browser?
Let's say I have some monsters in my game and they need to be generated randomly. They need to have some graphics and I am not sure what's the best way to do so. I have read a book where the writer used the time line to hold different images for cards for instance. The card class would then set it's content from the time line. In my opinion this really sounds like hard coding. Aren't there any better solutions to this like holding the images in an array or so.
Dear friends, I am a newcomer in action script and I'm in big trouble with a template (Monster 25,325) This product comes with a library in xml, but by default program, only 4 albums can be opened, I tried to add xml and other albums by I made the call button by the FLA, but No change occurred, and those that I number beyond 4 it does not open the larger images, they are miniature. What do I do? Sending down the Action Script Template. In all timelines.
how to make a template monster flash contact form work?its made with action script 1 The site is [URL]and here is the code for the form movie clip __________________________________________________ ________ _root.cont.cont2.txt.t11.onSetFocus = function() { if (_root.cont.cont2.txt.t1=="your name"){ _root.cont.cont2.txt.t1="";
In my file (AS2), I have a small square at the middle of the page. Diagonally to the right, I have a vertical wall which is a rectangle. Pasted inside my small square, I have the code:
onClipEvent(enterFrame) { if (Key.isDown(Key.RIGHT)) { if (this.hitTest(Wall._x, Wall._y, false)) _x =
While I'm just a beginner right now it/I'm an experienced computer user and I have really enjoyed/but when I'm looking at it now I'm trying to use flash to edit a website template, for example monster templates. I bought a template from the site and nine trying to edit it now and well it just seems like it's a very very long process to do something kind of where I just want to look at the page and I want to edit the text and only I go to bed doesn't seem to be the case. So I'll show you what I mean.
When I'm using the program and I'm in Adobe flash I'm looking now at the screen inside the program and there's no text I see the graphics images and there's no text and also is that some type of way where it's easy to navigate link to link where I can just edit the text what supposed to be in there rather than search for the funeral push page up and down until I come across just a white background with tax and then have to edited which is pretty confusing because I don't know where that's located but I the general idea that if you change it but surely there must be an easier way.
So basically I'm including a screenshot that shows you exactly what I'm talking about. Basically once again I'm in fashion items Sandy text so it's kinda hard to see what was going on or whatever so you can see the snow text located in the thing but however when I publish the file yeah you can see the text and everything I'm kinda looking for some type of you well be able to see this and just edited really. I know there are other programs out there like SWF edited her or quick note to some like that. But I really wanted to use flash, unexperienced Photoshop user and I really love all Adobe products and I really think that this is the master program to use however I'm really don't want it as of right now it's been about 40 days and nine still a bit lost navigating through the program will I'm just really just China entities tax bills and just go through the site. Now I realize I should have the respect for beautiful program like this and it's not been a be set up to the way that I'm hoping it Siskind be a point-and-click editor I understand that. I'm just wondering if anybody has any type suggestions or perhaps of I'm missing something which is fantastic.
Jesus Christ - I thought I was really good in flash.Got this template and I can't see S***. WTH - is it supposed to be this difficult to manipulate a template or am I stupid??? Go into project explorer and can't see much AS so how the hwll are they getting the images and text into the flash swf. By the html??? I don't think so.
I've been working with Flash for over 3 years, but I can't figure this one out. I've got a body of text, half of which are bulleted points designated by <li></li>. It's loaded into a html-ised dynamic textbox.
[Code]....
It displays fine as is. However, if I make the box selectable, and select any part of the bulleted list, the ENTIRE body of text turns into a giant bulleted list, including the non-bulleted portion at the beginning. I've managed to replicate this bug with Flash 8 and CS3, using a variety of flas made from scratch.
But the problem is that the car is moving when you controll it so the bullet stays on the same position and I want it to follow the car and start from the same position as the car whereever it goes.
I'm creating a small car game where you shoot from the car, so I've made a bullet animation with this code inside the mocieclip:
shellNo = 0; function shellEject(){ shell_holder.attachMovie("shellAnim", shellNo, shellNo); shellNo++; }
But the problem is that the car is moving when you controll it so the bullet stays on the same position and I want it to follow the car and start from the side of it whereever it goes.
I'm creating a small car game where you shoot from the car, so I've made a bullet animation with this code inside the mocieclip:
[Code]...
But the problem is that the car is moving when you controll it so the bullet stays on the same position and I want it to follow the car and start from the same position as the car whereever it goes.
Basically i just need a simple way to remove the "Enemy" when it comes into contact with "bullet".Ive been looking on the internet but its just really confusing me at the moment. And im not sure how easy its gonna be with the way i have set it up.
I am playing around with ActionScript 3 and trying to build a very simple prototype for a video game (top-down action/shooter) and realized that handling bullets is a little bit more challenging than I originally imagined.
In order to get a fairly decent "flight" of the bullet between the character and the target, I ended up using a highly modified version of Bresenham's Line Algorithm to determine the flight path of the bullet and then merely draw a tiny flash.geom.Rectangle object at the appropriate place on that "flight path" during the draw-frame stage of my application.
I haven't noticed any real problems, but I just can't imagine this being the best way to handle bullets in a Flash game. I imagine that once there are multiple enemy players on the screen and lots of bullets flying around (especially once I code in automatic weapons) that things could come grinding to a halt.
What am I missing here? I'm not really a game developer and so most of the things I'm doing I've just "made up" on the spot, but I can't figure out how to effectively handle bullets in Flash.
EDIT: As requested, here is "my" Bresenham code. I say "my" in quotes, because I basically ripped this from somewhere on the internet. My changes to the algorithm basically involve the lines at the bottom. The original implementation would find the path from player character to the target, except that every once in a while (and I wasted a little bit of time trying to figure this out but never got anywhere) it will generate the path from the target to the player. To "fix" this, I ended up just checking the first X/Y values from the path array and reversing the array if those values didn't match the X/Y values of my player character.
im just testing some stuff, and everytime the space key is pressed i want one bullet to come out, however righty now you can just hold down space and it keeps firing...heres the code i used [code]
I am trying to create a bullet hole effect when you click the mouse down.I want a bullet hole to appear where you click the mouse and to stay there, and then when you have > 10 bullet holes on the stage i want to earliest ones to start to fade out.
i have a slight problem, im just testing some stuff, and everytime the space key is pressed i want one bullet to come out, however righty now you can just hold down space and it keeps firing...heres the code i used :
on (keyPress "<Space>") { i = i+1; duplicateMovieClip(_root.bullet, "bullet"+i, i); }
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;
I have added some bullet points in dynamic text but the gap between each one is massive, how can I get it so they are directly under each other.I am using the tag <li>
I am trying to program a game and I want the enemy character to fire a bullet every second, but instead he is firing an infinite amount of bullets right after the other. Here's the code with the timer:
if (k == 0){ var shootRight1 = new Timer(1000,1); shootRight1.addEventListener(TimerEvent.TIMER_COMPLETE, enemy1shoot); shootRight1.start();
I found a tutorial on the internet and have begun toying with it. I figured out what all the segments did and how they worked and effected the game (mostly through trial and error...) once i figured out what EXACTLY i had i started making changes.
-What i want - once the bullet hits a monster OR goes out side of the range of the gun it disappears and another shot can be fired (which is done automatically via my script no user input needed)
-What i have - when the bullet goes off the page (x>550, x<0, Y>400, Y<0) it disappears and another shot can be fired... obviously this is problematic to game play...