Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Help Arching Bullets


Hey guys im working on make a tank wars game for a project and i am having a little trouble getting the bullets to arch. I can get them to shot at the angle of the cannon but can not get the arching effect.
Thanks for any help




FlashKit > Flash Help > Flash ActionScript
Posted on: 10-19-2006, 12:02 AM


View Complete Forum Thread with Replies

Sponsored Links:

Arching Text
I am trying to replace a graphic with text in flash, but can't seem to figure out how to arch the text around a circle. Here are the files http://www.highpoint.edu/~councm04/vision The text on the intro needs to be fixed and I can't arc it. Does anyone know of a tutorial or quick way to do this in Flash? If not flash, Freehand?

View Replies !    View Related
Bullets
How do you make bullets come out in the direction a gun is pointing, also how do u set speed of it, i know how to stop it and to make things do stuff when the object hits it.
Cheers

Your Friendly Neighbourhood PlugDude

View Replies !    View Related
Bullets
Hi,


Im trying to build a top down shooter but I hit A bump with the bullets so far the only way I have found to do bullets is x =- 1 etc
is there any other way to fire bullets?

View Replies !    View Related
Bullets
Is there a way to make bullets in Flash like the way you would in Word or html?

View Replies !    View Related
Bullets
Hi,

I am trying to put bullets in my flash application using Action script.
I don't know whether it is possible or not. If any one know , please reply to
my query.If possible, how many types bullets can I insert in my flash application.

View Replies !    View Related
Bullets
You know how in Word you can use bullets before sentences? How can I duplicate that in Flash without having to draw it?

Thanxs!

View Replies !    View Related
Bullets?
Hello.

I am making a simple space game where you fly along and can strafe side to side. I have made my spaceship so that it can shoot bullets

What i would like to know is what do i need to do so that when a bullet hits an enemy ship that ship explodes?

//This is how i made my bullets
First of all i made a movie clip called 'bullet' which has an instance name of bullet.

I applied this script to the bullet


Code:
onClipEvent(load)
{
speedX = 25
}

onClipEvent(enterframe)
{
for (var i = 0; i < speedX; i++)
{
_x++;
}
}
And then i applied this spcript to the spaceship that shoots the bullets

Code:
//Bullet Shooting
onClipEvent (load)
{
i = 0
timer = 0
dir = "right"
}
onClipEvent(enterframe)
{
if (!Key.isDown(Key.SPACE))
{
timer = 5
}
if (Key.isDown(Key.SPACE))
{
if (timer >=5)
{
i++
if (dir == "right")
{
duplicateMovieClip("_root.Bullet", "Bullet" + i, i);
_root["Bullet" + i]._x = this._x
_root["Bullet" + i]._y = this._y - 0
_root["Bullet" + i]._visible = true
}

timer = 0
}
timer++
}
}
//
Please help me

View Replies !    View Related
Bullets ...
Hello,

Anyone know how to get bullets for text in flash?
------------------
Example:One
Two
-----------------

Thank you.

View Replies !    View Related
Bullets?
Hello.

I am making a simple space game where you fly along and can strafe side to side. I have made my spaceship so that it can shoot bullets

What i would like to know is what do i need to do so that when a bullet hits an enemy ship that ship explodes?

//This is how i made my bullets
First of all i made a movie clip called 'bullet' which has an instance name of bullet.

I applied this script to the bullet


Code:
onClipEvent(load)
{
speedX = 25
}

onClipEvent(enterframe)
{
for (var i = 0; i < speedX; i++)
{
_x++;
}
}
And then i applied this spcript to the spaceship that shoots the bullets

Code:
//Bullet Shooting
onClipEvent (load)
{
i = 0
timer = 0
dir = "right"
}
onClipEvent(enterframe)
{
if (!Key.isDown(Key.SPACE))
{
timer = 5
}
if (Key.isDown(Key.SPACE))
{
if (timer >=5)
{
i++
if (dir == "right")
{
duplicateMovieClip("_root.Bullet", "Bullet" + i, i);
_root["Bullet" + i]._x = this._x
_root["Bullet" + i]._y = this._y - 0
_root["Bullet" + i]._visible = true
}

timer = 0
}
timer++
}
}
//
Please help me

View Replies !    View Related
Bullets
hello! i want to use bullets and numerings before any paragraph text line in my flash movie...how can i do this? i cant see any choises for bullets (

View Replies !    View Related
Sub-Bullets?
Is there any more elegant way to produce sub-bullets in a flash field than using css classes? Using the classes is easy enough, just looks unnecessarily ugly in the code. =P

Thanks for any help!

View Replies !    View Related
Those Pesky Bullets
Trying to add bullets to dynamic text array from txt file but so far no luck,

Well this is where I'm up too, I feel close but yet so far,

this is on my mc containing a dynamic textfield.

onClipEvent (load) {
bulletpoint.text=_parent.passarray[1];
bulletpoint.multiline=true;
bulletpoint.wordWrap=true;
var format = new TextFormat();
format.bullet = true;
bulletpoint.setTextFormat(format);

}

In my first frame I have :

varReceiver = new LoadVars();
varReceiver.load("external013.txt");
varReceiver.onLoad = function() {
passarray = this.mypage.split("|");
};

View Replies !    View Related
Bullets Coming Out Of Nowhere
hello,

i just wanted to ask how people
make a command that whenever they press a key,

a tiny bullet springs out of a gun

and it just continuously goes to where that
guns pointed(namely left or right) just goes straght
and dissappers when off screen,

i've read a tutorial here about that
but it seemed quite different than the
one im looking for

so can anyone be able to help me out with this?

thnx a bunch!!

View Replies !    View Related
Bullets And Hittest
I'm making a sort of side scrolling shooter, and I've ran into a second problem:

When I shoot a gun I want the bullet to exit the gun barrel and move (in the angle in which it shot from) along the movie screen. This all works with this script:


Code:
obj2 = new Object();
obj2.x = shot_release._x;
obj2.y = shot_release._y;
this.localToGlobal(obj2);
_root.bullet_trace(obj2.x, obj2.y, this._rotation, 20);

('this' is the arm holding the gun)

'bullet_trace' function in _root:

Code:
function bullet_trace(xx, yy, angle, damage){
_root.attachMovie("bullet_trace_mc","bullet_trace"+_root.Bullettrace_i,_root.Bullettrace_i,{_y:yy, _x:xx});
setProperty("bullet_trace"+_root.Bullettrace_i, _rotation, angle);
_root.Bullettrace_i++;
}


Now I want to hittest, it's the only way I know off to get the info whether a bullet hits something or not. I made a mc with this code:


Code:
onClipEvent (enterFrame) {
a = 0;
while(a < 10){
string = "bullet_trace"+(_root.Bullettrace_i + a);
with("_root."+string) {
if (this.hitTest(getBounds(_root).xMax, _y, true)) {
trace('hit');
}
if (this.hitTest(getBounds(_root).xMin, _y, true)) {
trace('hit');
}
if (this.hitTest(_x, getBounds(_root).yMax, true)) {
trace('hit');
}
if (this.hitTest(_x, getBounds(_root).yMin, true)) {
trace('hit');
}
}
a++;
}
}


I used while(a < 10) because there can be more bullettracers in the movie per frame.

This part :

string = "bullet_trace"+(_root.Bullettrace_i + a);
with("_root."+string)

does not work. If I try with(_root.Bullettrace_i20) for testing it will trace('hit'); so the problem lays with the string part. I tried several other things and I have no clue what to try next. Anyone has an idea? Thanks in advance.

View Replies !    View Related
Making Bullets Fly
Hello all! I'm new to the Flashkit.com forums and a regular user of the flashkit site and now I need some help with making a shooting game. Right now I have an aeriel third person view of the game with the character moving wherever you want, a crosshairs symbol for the cursor, and the character rotating depending on where the crosshairs are. Now I'm trying to get a shooting animation to work. I want the bullets to fly after clicking and releasing the mouse button, hopefully you guys can help me out with this... Thanks!

View Replies !    View Related
[mx04] Bullets
i never leaned how to do gun bullets.


lets say i draw 1 bullet in one syimbol. How would i duplicate it during runtime.

when mouse down you shoot and the bullet flys to the right with its own x and y coordinate. Then on impact it dissapears or gets recycled.

View Replies !    View Related
Game - Bullets
Can anyone get me a "bullet script"
for example when I click some specific key, bullet will shoot from my character causing damage in whatever in it's way (for example another character)

Thank you

View Replies !    View Related
[F8] Help Firing Bullets
Hey guys, I'm having some trouble getting my ship to fire its bullets in my game. I'm following a tutorial given to me by my tutor and I think I've followed it perfectly so I don't understand what's going on. The files are attached.

Can anyone help?

Thanks

Pete

View Replies !    View Related
Stuck With Bullets
Can anyone help me, the actionscript works, but i can't get the bullets to remove them selfs when they hit the enamies or when they leave the screen.

Code:
}
function fireBullets() {
i++;
fire = true;
_root.MachineGunAmmo -= 1;
var newname = "bullet"+i;
_root.attachMovie("bullet",newname,i*100);
_root[newname]._y = _root.Plane._y+1;
_root[newname]._x = _root.Plane._x+65;
_root[newname].onEnterFrame = function() {
var bullet_speed = 20;
this._x += bullet_speed;
if (_root[newname]._y>900) {
removeMovieClip(_root[newname]);
}
if (this.hitTest(_root.Enemy)) {
removeMovieClip([newname]);
with (_root.Enemy) {
gotoAndPlay("Dead");
}
}
};
}
}

View Replies !    View Related
[F8] Enemy Bullets
How would i make an enemy bullet go towards the main charecter?

View Replies !    View Related
Best Method Bullets
Well I think i finally got character control down the way I like it and my aiming mechanism is set, but I need to know how to do a few things...

1. The best method to create bullets that travel on a set path at a set distance but do not spam up memory by existing infinatly becuase then my character contorl get's laggy.

2. How to set events for when the number row keys (1,2,3,ect) so i can have weapon select on nubmer row (right now I have 2 weapons unarmed and handgun so i used built in keys (INSERT and DELETE)

htt[s://home.comcast.net/~archmagediablo/gun.fla

View Replies !    View Related
Custom Bullets With CSS?
Hi, is there any way to make a custom bullet for the <li> items? or for any custom CSS classes? I'm presuming there isn't, and I need to load bullets as seperate text fields - but I just want to verify this belief! thanks!
seb.

View Replies !    View Related
Bullets In Flash With XML?
What is a good way to format bullets and tabs in my XML text that I am using in Flash?

View Replies !    View Related
Inserting Bullets Into XML
Hello Everyone.

I am saving some data into an XML and i need to be able to store bullets in a paragraph and let a user edit those bullets. The paragraphs are a simple text nodes:

<paragraph>I have a paragraph here and here</paragraph>

So my problem is that i know how to turn the whole thing into a bullet but i don't know how to do that with a section that a user picks. If for example they wanted to create a bullet from "paragraph here" - how do i designate the text before and text after to remain a text node 'before' and text node 'after'. Or should i do this in a different way??

Any help or pointers will be appreciated.

Thanks!

Alina

View Replies !    View Related
Bullets , At Angels
hello..
its now really late and i should be sleeping, but instead im doing this...

anyways ...

i have 4 set variables (im just making this up , theyll change from bullet to bullet ingame)
bulletSpeed=200
bulletAngel=45
bulletX=100
bulletY=100

now i want to know how to make it so every time a function is called a bullet (movie clip called 'bullet' is created at those coordinates moving at that speed and going in that angel (and deleting itself after 3 seconds)

thanks )

View Replies !    View Related
Bullets , At Angels
hello..
its now really late and i should be sleeping, but instead im doing this...

anyways ...

i have 4 set variables (im just making this up , theyll change from bullet to bullet ingame)
bulletSpeed=200
bulletAngel=45
bulletX=100
bulletY=100

now i want to know how to make it so every time a function is called a bullet (movie clip called 'bullet' is created at those coordinates moving at that speed and going in that angel (and deleting itself after 3 seconds)

thanks )

View Replies !    View Related
Color Of <li> Bullets
I have html content loaded into dynamic text fields from XML.
I was wondering if anyone has been able to change the color of the <li> bullets in flash???
They stay black for me not matter what the textField, textFormat, or CSS properties are....
I can apply CSS in flash to the li tags, but it only effects the text in the li's, not the actual bullets.

View Replies !    View Related
Bullets In Flash
Is there a way to add bullets into a text block in flash?

View Replies !    View Related
Pesky Bullets In Mac Font
I'm looking to see if anyone has experienced a similar problem or found a way around it. Using the Mac version of Flash MX, I have found a dramatic inconsistency with the usage of bullets (option 8) in that sometimes, they get turned into the Y's with the lines through them, and sometimes not. Everytime I think I have figured out the problem, something comes up to shoot down my theory.

The exact same font files, used on two or three different computers running flash MX, produce varying results-- on one computer, all bullets are fine. On one computer, bullets can't be bold-- unbold bullets remain fine. On one computer, it seems nothing works but drawing in circles manually.

What's more troubling is the fact that after opening a file off the bold/non-bold computer on the one that had previously been fine regardless, the previously fine computer adopted the same bold/unbolding problem; this leads me to believe it's a preference of some sort somewhere causing all the headaches. I've searched the manual, the online help, and all the options in the program I can find but can't seem to locate this.

Can anyone tell me the solution to this? Or am I simply losing my mind with all these differences?

View Replies !    View Related
Using Bullets And <br> In Txt Fields Dynamically?
i know you can put a bullet at the end of an array using the array.join() AS, but what if i had an array[x] that was lengthy and i wanted to dynamically insert a bullet and/or <br> depending on the length?

so i could do something like this:

Quote:




title
- blah blah blah blah
- slkfjsfdl sfdlksjfdlksfd lksfdkl lkasfd lksfd jaslfdklka
sfdlkj sdflkj sfdlksfdlsfdk asfdlkasfdasfd
- 123132 12321 123 132132




(where the returned text would be aligned nicely next to the bullet above it like microsoft word bullets?)

im using F5.

any ideas? thanks

View Replies !    View Related
Dynamic Text With Bullets
Hey,

Anyone out there know of a way to incorporate bullets within a dynamic text set-up? Currently I have a .swf file reading from a .txt file however, in the case of bullet points I am manually setting the <br>'s for line breaks as well as adding empty spaces to include any indentation. Any help would be great.

Thanks
-j-

View Replies !    View Related
Plane Game Bullets
I just took the tutorial on how to make objects move from commands. My only questions left are these: 1. how do I set the buttons to use. I tried typing an A where it originally said LEFT, but it did not work.

My next question is how would I get a bullet (im using red lines) to come from the plane. I tried making a movie clip but it would always come from the same spot.


Finally, what is the code to say something like "on (press) (lets say space). I do not know how to do that? Any help? I think this question is the easiest one of them all

View Replies !    View Related
Bullets No Problem, But Gifs Are
I have 2 gifs on certain Powerpoint pages and the white gif background stands out, wheras those gif backgrounds were transparent in the original Powerpoint. So, do I have to go through all 24 slides and replace these gif images with vectors? Big job for something that is due tomorrow.

I haven't exported the Flash file with a Powerpoint element yet, but I'm guessing that the animations that were in the Powerpoint file are going to be static now. Am I right?

Would RoboFlash help with any of this?

View Replies !    View Related
Bullets With External Txt Into Array
Hi I know that I can use <AI> to generate a bullet from a txt file when dynamically loaded in to a textfield but..

Is it possible to create bullets for text imported from a txt file into an array when using the split technique.ie.

varReceiver = new LoadVars();
varReceiver.load("external.txt");
varReceiver.onLoad = function() {
passarray = this.myArray.split("|");

View Replies !    View Related
Custom Password Bullets?
Is it possible to replace the asterisks in a password field with bullets? I've looked in all my Flash books and searched FK with no help.

Thanks!

View Replies !    View Related
Changing The Color Of Bullets In A <ul> Tag?
I'm pulling in text dynamically from a text file and formatting it using html tags. My text is white on a black background. When I use the unordered list <ul> tag it makes all the bullets black.

Is there any way of making these bullets white? (the font color tag doesn't change them)

View Replies !    View Related
A Stupid Question About Bullets
I don't see an option for adding bullets before text. Can someone help me find that option in the text properties?

View Replies !    View Related
Bullets Fired In All Directions
Hello, I need help with some thing. I need this so badly. Here is a sample file. Notice how the bullets fly in the direction that the person aims at, can anyone point out what does this? Or could anyone teach me how? I have inspected this game and cannot find the source of it. Please help!!??! Please PM me if you want, it makes it easier for me to find answers. Sometimes I loose the post that I posted in, thanks.
-Brent

View Replies !    View Related
Shooting Multiple Bullets
I have this code and it want it so that it will shoot multiple bullets, currentgun 2 is a shotgun, also how do I make it so that you can hold the mouse down to shoot?

Code:
onClipEvent (mouseDown) {
fireBullets();
var i;
function fireBullets() {
i++;
speed = _root.hero.currentgunspeed;
var newname = "bullet"+i;
_root.attachMovie("bullet", newname, i*100);
if (_root.hero.currentgun == 2){
i++;
_root.attachMovie("bullet", newname, i*100);
i++;
_root.attachMovie("bullet", newname, i*100);
}
_root[newname]._y = _root.hand._y;
_root[newname]._x = _root.hand._x;
_root[newname]._y = _root.hand._y;
_root[newname]._x = _root.hand._x;
_root[newname]._rotation = _root.hand._rotation;
_root[newname].sety = _root._ymouse;
_root[newname].setx = _root._xmouse;
_root[newname].createy = _root.hero._y;
_root[newname].createx = _root.hero._x;
_root[newname].timetokill = 0;
myRadians = Math.atan2(_root[newname].sety-_root.hero._y, _root[newname].setx-_root.hero._x);
_root.xMove = Math.cos(myRadians)*speed;
_root.yMove = Math.sin(myRadians)*speed;
_root[newname].movey = _root.ymove;
_root[newname].movex = _root.xmove;
_root[newname].onEnterFrame = function() {
this._y += this.movey;
this._x += this.movex;
this.timetokill++;
for (n=0; n<20; n++) {
var name = "enemy"+n;
if (_root[name].hitTest(this._x, this._y, true)) {
_root[name].health -= _root.hero.currentgundamage;
this.removeMovieClip();
}
}
if (_root.ground.hitTest(this._x-5, this._y, true)) {
this.removeMovieClip();
}
if (this._x>_root.hero._x+600 or this._x<_root.hero._x-600 or this._y>_root.hero._y+600 or this._y<_root.hero._y-600) {
this.removeMovieClip();
}
};
}
}

View Replies !    View Related
How Can I Make A Guy, Shoot Bullets?
Hi!
Title explains it..

How can i do this with simple actionscript?

I have tried.. Having the bullet inside the mc (moving) but when i shoot, the bullet follows the mc moving....

View Replies !    View Related
[F8] Best Way To Create And Move Bullets?
What is the best way to create and move bullets with minimal speed loss?

this is what i have now but it seems to slow the game down about 5 fps.


Code:
function shoot(ob){
bulletid++;
if(bulletid>100){
bulletid=0;
}
bn="bullet"+bulletid;
trace(ob._y);
_root.attachMovie("bullet_1",bn,200+bulletid);
_root[bn]._x=ob._x;
_root[bn]._y=ob._y;
_root[bn]._rotation=ob.arm_front._rotation;
myRadians = _root[bn]._rotation*Math.PI/180;
_root[bn].xMove = Math.cos(myRadians)*ob.wspeed*-1;
_root[bn].yMove = Math.sin(myRadians)*ob.wspeed*-1;
_root[bn].onEnterFrame=function(){
this._x+=this.xMove;
this._y+=this.yMove;
}
}

View Replies !    View Related
[F8] HELP Bullets Stick In Non-English
I've got a text box (using _sans, html on) loading html from xml (utf-16) files and, when I load English text with the <li> tag, it works fine. When I load Russian or Korean text with the <li> tag, the field suddenly marks EVERY line with a bullet and it sticks and I can't make the bullets go away...

HELP!!!!

I attached an fla and several xml files so you can see what I'm talking about. Also, the Korean doesn't display in the field...not sure why. It works in our actual application, but we're loading the xml files using SWF Studio, but we have the same bullet issue...

This has been driving me crazy all weekend, and I'm about to throw in the towel...

Edit: I should clarify, when you select Rus or Kor bullets, the first time it loads, it displays fine. When you load ANY other file (even one with no list tags), it puts all the bullets on the fields...

View Replies !    View Related
Limiting Number Of Bullets
This has been an issue to me since I switched to AS3.

PHP Code:




//AS2
count++;
attachMovie("bullet", "bullet" + count, count);

if (count > 20) {
count = 0;
}






This has always been how I limit the number of bullets to prevent lag but I don't know how to do it in AS3.

PHP Code:




stage.addEventListener(Event.ENTER_FRAME, myfunction);
function myfunction(event:Event) {
if (fire == true) {
var bullet = new bulletmc;
addChild(bullet);
bullet.x = 100;
bullet.y = 100;
}
}
//If I press a button, fire becomes true and if I let go, it becomes false
//Let's pretend the bullets do move






How do I convert the way in AS2 to AS3?

View Replies !    View Related
My Bullets Aren't Following My Spaceship
I have another problem... alright, this time the problem is that, when i press the button i set to shoot (or in this case, shift), the bullet appears, but doesn't appear where it should. generally, it appears in the upper left hand corner, where i have the spaceship in the middle left. My code is this:

var i = 0;
this.onEnterFrame = function() {
var speed;
speedx = 10;
if (Key.isDown(Key.SHIFT)) {
i++;
_root.attachMovie("Bullet","Bullet"+i,_root.getNex tHighestDepth());
_root["Bullet"+i]._x = Ship._x;
_root["Bullet"+i]._y = Ship._y;
}

Ship is the instance name, so it should start right at the ship, but it appears way off!! oh, and as i move, the distance between the two objects seems to get smaller, until at about 3 fourths of the way across the screen, and all the way on the bottom. I have no clue why this is. If anyone has any insight, it would be greatly appreciated. Oh, and if you know how to make the bullet appear in a layer underneath my ship, that would be cool, too. Thanks!

View Replies !    View Related
Custom Bullets Via Font - NOT Via CSS
Folks,

Pulling my hair out... after much searching I've come to the realization that Flash didn't intend for us to be able to use custom bullets via CSS.

What I'm attempting to do is split/join a string brought in from an external XML file. What I'd like to do is split where I find a <li> and replace it with <span class='check'>R</span>.

In my CSS I define the check class as having font-family: Wingdings 2;

Of course, Flash only displays an "R" where it should be displaying the Wingdings 2 symbol for "R", which happens to be a box with a check in it.

What am I doing wrong? Even trying <font face="Wingdings 2">R</font> in place of the <span...> isn't working.

Thank in advance.

Steve

View Replies !    View Related
Help With Bullets Hold Mouse Down ?
hey .. im in the making of a alien invaders type game .. and i wanna input an upgrade after level 3 .. like u can purchase it or something .. i wanna have it upgrade to rapid fire .. like holding the mouse down .. but i cant seem to figure out how to make it fire by holding the mouse down.. the code i have says _rootonMouseDown = function .. so why wouldnt that repeat the action .. ? im baffled ne help would be apprieciated .. heres the link to the game so far..

http://img46.exs.cx/my.php?loc=img46...vaders2223.swf

also if it helps heres the code im using

//-------------MOUSE CLICK----------//
_root.onMouseDown = function() {
// duplicate the bullet mc
attachMovie("bullet", "bullet"+bulletNum, bulletNum);
// set the coords to the mouse clik
eval("_root.bullet"+bulletNum)._x = _root.defender._x;
eval("_root.bullet"+bulletNum)._y = _root.defender._y;
// increment the bullet number
++bulletNum;
// if more than 5 bullets , start again at 0
if (bulletNum>5) {
bulletNum = 0;
}
};

View Replies !    View Related
Shooting Multiple Bullets
I have this code and I want it so it will shoot multiple bullets currentgun 2 is a shotgun and also how do i make it so you can holddown the mouse to shoot?

Code:
onClipEvent (mouseDown) {
fireBullets();
var i;
function fireBullets() {
i++;
speed = _root.hero.currentgunspeed;
var newname = "bullet"+i;
_root.attachMovie("bullet", newname, i*100);
if (_root.hero.currentgun == 2){
i++;
_root.attachMovie("bullet", newname, i*100);
i++;
_root.attachMovie("bullet", newname, i*100);
}
_root[newname]._y = _root.hand._y;
_root[newname]._x = _root.hand._x;
_root[newname]._y = _root.hand._y;
_root[newname]._x = _root.hand._x;
_root[newname]._rotation = _root.hand._rotation;
_root[newname].sety = _root._ymouse;
_root[newname].setx = _root._xmouse;
_root[newname].createy = _root.hero._y;
_root[newname].createx = _root.hero._x;
_root[newname].timetokill = 0;
myRadians = Math.atan2(_root[newname].sety-_root.hero._y, _root[newname].setx-_root.hero._x);
_root.xMove = Math.cos(myRadians)*speed;
_root.yMove = Math.sin(myRadians)*speed;
_root[newname].movey = _root.ymove;
_root[newname].movex = _root.xmove;
_root[newname].onEnterFrame = function() {
this._y += this.movey;
this._x += this.movex;
this.timetokill++;
for (n=0; n<20; n++) {
var name = "enemy"+n;
if (_root[name].hitTest(this._x, this._y, true)) {
_root[name].health -= _root.hero.currentgundamage;
this.removeMovieClip();
}
}
if (_root.ground.hitTest(this._x-5, this._y, true)) {
this.removeMovieClip();
}
if (this._x>_root.hero._x+600 or this._x<_root.hero._x-600 or this._y>_root.hero._y+600 or this._y<_root.hero._y-600) {
this.removeMovieClip();
}
};
}
}

View Replies !    View Related
How Add Bullets To Flash Text ?
How do I add a bullet to Flash text? I know that alt0149 is the html code. In the Flash text box and before the first text character, I tried pressing the ALT key and simultaneously typing in 0149. Nothing happened.

A similar question was asked on this forum... the answer was go to the Character Map (where is that) or use dynamic text (I tried putting alt0149 in the dynamic text box ??? but it didn't work).

My work-around so far is to copy a similar bullet and add it to the text box. But there must be a quicker way.

Please be clear and state all the steps. Thank you very much.

View Replies !    View Related
Shooting Multiple Bullets
Hello everyone,
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.

...

if(event.keyCode == Keyboard.SPACE)
{

bullet_right_mc.y = (ball_mc.y -38);
bullet_right_mc.x = (ball_mc.x + 253);
bullet_right_mc.gotoAndPlay("shoot");
}

...

Thanks

Ryan

View Replies !    View Related
Bulleted List = No Bullets?
I have a dynamic text box that receives text from an xml file. The text has html formatting, and the text box is set to receive html text. The text formats the bulleted list fine, except no bullets show up, just indented text.

I figured I needed to embed the font since it might be a special character, but that hasn't seemed to help. Any ideas?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved