Fighting Game
Hi all
Okay, i starting to make a fighting game with one of my friends. I've got some actionscripting skills, enough to start moving characters and stuff but i need a bit of help with "computer characters" and stuff ie creating a basic AI for the 2nd player and stuff
thanx for reading any help would be great
Cheers Zidane
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 10-01-2003, 02:05 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Fighting Game Help
M'kay I'm having some problems here with my fighting game I'm gonna make
I have all the moves the hittest and how to control them (not an amiture ..) but I need to make a apponent and when I have him set to attack he basicly runs straight stops and never moves it's making me mad
please if u can help me my email is
alergic2life@email.com
my msn is
alergic2life@hotmail.com
my aim name is
gameremakes
that's all
-Ryan O'Dell
Help With Fighting Game
i am making a fighting game, but i dont want to have to make two guys. If i copy the movie clip and paste it on the other side of the screen and flip it around, will it mess everything up, if so, is there a way to do this, without actionscript preferably. Also, is there an action to allow people to choose the color?
Fighting Game, Help
My game freezes everytime you press New Game, I don't know what's wrong with the p1 actionscript. I need help, does anybody know what's wrong? Many Thanks
Help With Fighting Game
Hi guys. It's been a very long while. I think my old post was 2 years ago and got deleted.
Anyways, I've made a fighting game and everything is AOK except for one tiny problem that has made the game a lot less fun. When you go near your opponent and you attack, the game stops for 1/2 a second. It is like lagging but experiments show that it is not lagging because as I reduce the quality and dimensions, the game seems to be very very smooth but when attacking the game still stops for 1/2 second.
If you guys have any idea why this problem happened and how to solve it, please let me know. I'd appreciate it a lot. Thanks in advance. Please also tell me if you do not encounter this problem.
http://n.1asphost.com/Damus/testing/finalslam.html
WSAD and GH for player1
Arrows and Numpad 5 and 6 for player 2
(Blocking is automatic when standing still or parrying, like Tekken, so if you want to get a hit, your opponent must be moving, attacking or jumping)
Fighting Game
Do anyone think it is hard to make? Any clue to make it? I mean 1 person walk and hit enemy and get point. Like A RPG. Not VS one.
Fighting Game Help
Hi!
I'm new here, but not to Flash!
I dunno, some of you may have seen some of my stuff...
But anyhow, let's get to the point.
So I'm currently building a fighting game (better than the test one I built).
I'm having trouble with a Key.isDown test.
I have one of these going:
Code:
if(Key.isDown(78)){
gotoAndStop(2); //punch frame
fight=true;
}
else
if(Key.isDown(77)){
gotoAndStop(3); //kick frame
fight=true;
}
}
.........And so on
I want the "Special Attack" to activate when the punch and kick buttons are pressed simultaneously.
I know that I probably need to use the "&&"/"and" operator, but it doesn't seem to work.
I just need Key.isDown(78) [Punch] and Key.isDown(77) [Kick] to be detected simultaneously.
Also, I'm having trouble creating Left and Right boundaries to keep the characters on the screen.
And if this has already been addressed, could someone tell me where it has been?
Thanks a bunch!
Fighting Game
okay, I want to create a turn based fight but I have no idea how to make the hp bar (of yourself or your enemy) get less random like if you choose the option kick, you'll kick the (poor) other guy and his health will go down with a random number between 0&10
Fighting Game
could anyone give me a step tp step tutorial for creating a game with stick figures? something like this:
it has 2 stick figures. you can move them with the arrow keys e.g
down would make him crouch, up would make a jump, left would make him move left and right would make him move right.
then when you press say... "x" on the keyboard he would kick. and if you press "z" he would punch.
im ok with the animations and everything i just need help with the layout and actionscript.
any ideas anyone?
Fighting Game Help, Please Help... TIA
Does anyone know how to make those shockwave or flash fighting games? Like from First person view,
where you punch another person. Like this game right here, http://www.newgrounds.com/gold/cake.php . If you have like a tutorial on that, or could send me the flash project which I could just change around, I'd be really happy.
Thanks,
Jimbo
Fighting Game
hey y'all, i need some help with actionscript, im making a game for a site and i need to kno.. well, how do u make one punch button, but when ur facing the other way it punches that way...
i think i need and if(frame=27) for example, but i dunno the code for the if frame is code
all help is appreciated, thx
Help With A Fighting Game
i want to make a game thats like king of fighter or street fighter,but i got problem with the running.what i am trying to do is when the player is pressing the left or right arrow,the character walks,and when the player press the key 2 times(with in 1 second or something)it starts running.i got no problem with the pressing the key 2 times and it starts running part,but when i try to set the time,i just have no idea how to do it,any idea?
Fighting Game
Hi all
Okay, i starting to make a fighting game with one of my friends. I've got some actionscripting skills, enough to start moving characters and stuff but i need a bit of help with "computer characters" and stuff ie creating a basic AI for the 2nd player and stuff
thanx for reading any help would be great
Cheers
Zidane
Fighting Game
could anyone give me a step tp step tutorial for creating a game with stick figures? something like this:
it has 2 stick figures. you can move them with the arrow keys e.g
down would make him crouch, up would make a jump, left would make him move left and right would make him move right.
then when you press say... "x" on the keyboard he would kick. and if you press "z" he would punch.
im ok with the animations and everything i just need help with the layout and actionscript.
any ideas anyone?
Fighting Game
hey y'all, i need some help with actionscript, im making a game for a site and i need to kno.. well, how do u make one punch button, but when ur facing the other way it punches that way...
i think i need and if(frame=27) for example, but i dunno the code for the if frame is code
all help is appreciated, thx
Fighting Game Help
Does anyone know where to find information on creating the Actionscript for a computer opponent in a fighting game? Another words, know an AI tutorial? Any help would be greatly appreciated. Thanks. Bo
Flash Fighting Game.
A few people and I were thinking, we should start a project on our own time but to have a discussion about it, about its animation and discussion about its scripts. Having to make a Flash Game which will be downloadable and will be placed in different flash websites and game websites, also all of the ones working on it, even just giving ideas but actually participating , will be credited. The only thing we wont make, is an RPG, it is far to big to make. I was thinking more like a fighting type game. The animation will be great no matter what, the discussion about the fighting game will be when we gather up more flash programmers. Interested?
Cheers.
Hittests For Fighting Game - Please Help
Hi all, again!
I've managed to get all the character controls sorted in my fighting game, and now I'm doing the hittests. I'm aware of basic hittest function and this is how I currently have the test code.
if(_root.player2.hitTest(this._x,this._y,true)){
gotoAndStop(7)
takinghit = true;
health -= 2;
}
Now, obviously, I want the character to only take hits when they are hit by the end of a sword or an attacking foot or the like.
What I'm wondering is what is the best way to go about this, so I can specify certain areas for the hit test. I know you can specify the x and y values but how do you specify the ending coordinates for the hit area? Is this the best way to do it or is it best to make new movie clips that outline the sword or whatever and use them for the hittests instead??
As usual, I hope I make sense and would be grateful for any help!
Fighting Game Trouble.
Hi,
I was hoping you could help me with this code I found in a fighting game tutorial on newgrounds.I know its not the best way of doing it but could someone please help me with fixing it.
The part thats gone wrong is the second last paragraph, if used the whole code messes up and stops working but if not used then when the character jumps, he does'nt fall back down.
Please help.
Im going to have to post the script only because the fla file is too large.
onClipEvent (load) {
speed = 7;
inair = false
upright = false;
upleft = false;
starty = 325;
maxy = 75;
movey = 25;
_root.punch = false;
_root.kick = false;
}
onClipEvent (enterFrame){
if (!Key.isDown(Key.LEFT) and !Key.isDown(Key.RIGHT) and !Key.isDown(Key.DOWN) and inair == false and this._currentframe>1 and _root.punch == false and _root.kick == false) {
this.gotoAndStop(2);
down = false;
}
if (Key.isDown(Key.RIGHT) and !Key.isDown(Key.UP) and inair == false and this._currentframe>1) {
this.gotoAndStop(3);
this._x += speed;
}
else if (Key.isDown(Key.LEFT) and !Key.isDown(Key.UP) and inair == false and this._currentframe>1) {
this.gotoAndStop(4);
this._x -= speed;
}
else if (Key.isDown(Key.DOWN) and inair == false and this._currentframe>1) {
this.gotoAndStop(5);
}
else if (Key.isDown(Key.UP) and inair == false and !Key.isDown(Key.LEFT) and !Key.isDown(Key.RIGHT) and !Key.isDown(Key.DOWN) and this._currentframe>1) {
up = true;
this.gotoAndStop(6);
}
else if (Key.isDown(Key.UP) and Key.isDown(Key.RIGHT) and inair == false and this._currentframe>1) {
upright = true;
this.gotoAndStop(7);
}
else if (Key.isDown(Key.UP) and Key.isDown(Key.LEFT) and inair == false and this._currentframe>1) {
upleft = true;
this.gotoAndStop(8);
}
}
onClipEvent (enterFrame) {
if (this._y>=starty) {
this._y = starty;
}
}
onClipEvent (enterFrame) {
if (up == true) {
_root.updir = "up";
} else if (upright == true) {
_root.updir = "upright";
} else if (upleft == true) {
_root.updir = "upleft";
}
}
onClipEvent (enterFrame) {
if (up == true and this._y>=maxy) {
this._y -= movey;}
if (this._y == maxy) {
up = false;}
if (upleft == false and up == false and upright == false and (_root.updir == "up") and this._y<starty) {
this._y += movey;
}
}
onClipEvent (enterFrame) {
if (upright == true and this._y>=maxy) {
this._y -= movey;
this._x += speed;}
if (this._y == maxy) {
upright = false;}
if (upleft == false and upright == false and up == false and (_root.updir == "upright") and this._y<starty) {
this._y += movey;
this._x += speed;
}
}
onClipEvent (enterFrame) {
if (upleft == true and this._y>=maxy) {
this._y -= movey;
this._x -= speed;}
if (this._y == maxy) {
upleft = false;}
if (upleft == false and up == false and upright == false and (_root.updir == "upleft") and this._y<starty) {
this._y += movey;
this._x -= speed;
}
else if (Key.isDown(90) and inair == false and this._currentframe>1) {
_root.punch = true;
this.gotoAndStop(9);
} else if (Key.isDown(65) and inair == false and this._currentframe>1) {
_root.punch = true;
this.gotoAndStop(10);
} else if (Key.isDown(81) and inair == false and this._currentframe>1) {
_root.punch = true;
this.gotoAndStop(11);
}
else if (Key.isDown(88) and inair == false and this._currentframe>1) {
_root.kick = true;
this.gotoAndStop(12);
} else if (Key.isDown(83) and inair == false and this._currentframe>1) {
_root.kick = true;
this.gotoAndStop(13);
} else if (Key.isDown(87) and inair == false and this._currentframe>1) {
_root.kick = true;
this.gotoAndStop(14);
}
}
onClipEvent (enterFrame) {
if (this._y<starty) {
inair = true;
} else if (this._y>=starty) {
inair = false;
}
}
onClipEvent (enterFrame) {
if (this._y>=starty) {
this._y = starty;
}
}
Rest assured I have all the animations and frames it demands.
Fighting Game (bug-problem)
Hey, I'm developing a 2-player fighting game.. and now I'm having a problem with one of the human controlled-characters..
The problem is this:
when player 2 is blocking, and player 1 starts punching/kicking like crazy.. the block isn't working.. unlike when it's vice versa.. (ergo, player 1 blocking and player 2 going crazy)
The goal: So that when you perform a "block", it CAN NOT be canceled by repeated hitting of keys "E" and "R"
--------------Here's player 1:s code
onClipEvent(load) {
startspeed = 8;
gravity = 12;
jumping = 0;
}
onClipEvent (enterFrame) {
//Go left
if (Key.isDown(65)) {
if ( jumping==0) {
this.gotoAndStop(3);
this._x -= 5;
this._xscale =-100;
_root.p1direction = "left";
}
else {
this.gotoAndStop(4);
this._x -= 5;
this._xscale =-100;
_root.p1direction = "sidejump";
}
}
//Go right
if (Key.isDown(68)) {
if ( jumping==0) {
this.gotoAndStop(3);
this._x +=5;
this._xscale =+100;
_root.p1direction = "right";
}
else {
this.gotoAndStop(4);
this._x +=5;
this._xscale =+100;
_root.p1direction = "sidejump"
}
}
//Blocking
if (Key.isDown(83)) {
this.gotoAndStop(5);
_root.p1action = "blocking";
}
//Punching
if (Key.isDown(69)) {
if (_root.p1action == "none") {
this.gotoAndStop(6);
_root.p1action = "punching";
if (_root.p1main, hitTest(_root.p2main)) {
if(_root.p2action != "blocking") {
_root.p2health._width -=10;
_root.p1strength._width +=10;
_root.p2strength._width = 0;
updateAfterEvent();
}
}
}
}
//Kicking
if (Key.isDown(82)) {
if (_root.p1action == "none") {
this.gotoAndStop(7);
_root.p1action = "kicking";
if (_root.p1main, hitTest(_root.p2main)) {
if(_root.p2action != "blocking") {
_root.p2health._width -=10;
_root.p1strength._width +=10;
_root.p2strength._width = 0;
updateAfterEvent();
}
}
}
}
//Jumping
if (Key.isDown(87) and jumping==0) {
jumping = 1;
starttime = getTimer()/1000;
startpos = _y;
}
if ( jumping==1) {
if ( _root.p1direction == "sidejump") {
time = getTimer()/1000-starttime;
_y = _y-(startspeed-gravity*time);
if (_y>startpos) {
_y = startpos;
jumping = 0;
_root.p1direction = "idle";
this.gotoAndStop(1);
}
}
else {
this.gotoAndStop(2);
time = getTimer()/1000-starttime;
_y = _y-(startspeed-gravity*time);
if (_y>startpos) {
_y = startpos;
jumping = 0;
_root.p1direction = "idle";
this.gotoAndStop(1);
}
}
}
}
onClipEvent(keyUp) {
_root.p1direction = "idle";
_root.p1action = "none";
this.gotoAndStop(1);
}
----------------and here's player 2:s code
onClipEvent(load) {
startspeed = 8;
gravity = 12;
jumping = 0;
}
onClipEvent (enterFrame) {
//Go left
if (Key.isDown(37)) {
if ( jumping==0) {
this.gotoAndStop(3);
this._x -= 5;
this._xscale =+100;
_root.p2direction = "left";
}
else {
this.gotoAndStop(4);
this._x -= 5;
this._xscale =+100;
_root.p2direction = "sidejump";
}
}
//Go right
if (Key.isDown(39)) {
if ( jumping==0) {
this.gotoAndStop(3);
this._x +=5;
this._xscale =-100;
_root.p2direction = "right";
}
else {
this.gotoAndStop(4);
this._x +=5;
this._xscale =-100;
_root.p2direction = "sidejump"
}
}
//Blocking
if (Key.isDown(40)) {
this.gotoAndStop(5);
_root.p2action = "blocking";
}
//Punching
if (Key.isDown(16)) {
if (_root.p2action == "none") {
this.gotoAndStop(6);
_root.p2action = "punching";
if (_root.p2main, hitTest(_root.p1main)) {
if(_root.p1action != "blocking") {
_root.p1health._width -=10;
_root.p2strength._width +=10;
_root.p1strength._width = 0;
updateAfterEvent();
}
}
}
}
//Kicking
if (Key.isDown(17)) {
if (_root.p2action == "none") {
this.gotoAndStop(7);
_root.p2action = "kicking";
if (_root.p2main, hitTest(_root.p1main)) {
if(_root.p1action != "blocking") {
_root.p1health._width -=10;
_root.p2strength._width +=10;
_root.p1strength._width = 0;
updateAfterEvent();
}
}
}
}
//Jumping
if (Key.isDown(38) and jumping==0) {
jumping = 1;
starttime = getTimer()/1000;
startpos = _y;
}
if ( jumping==1) {
if ( _root.p2direction == "sidejump") {
time = getTimer()/1000-starttime;
_y = _y-(startspeed-gravity*time);
if (_y>startpos) {
_y = startpos;
jumping = 0;
_root.p2direction = "idle";
this.gotoAndStop(1);
}
}
else {
this.gotoAndStop(2);
time = getTimer()/1000-starttime;
_y = _y-(startspeed-gravity*time);
if (_y>startpos) {
_y = startpos;
jumping = 0;
_root.p2direction = "idle";
this.gotoAndStop(1);
}
}
}
}
onClipEvent(keyUp) {
_root.p2direction = "idle";
_root.p2action = "none";
this.gotoAndStop(1);
}
Help, Fighting Game Errors
I have two problems. Not them.
I'm trying to make a fighting game, hopefully sidescrolling.
Problem 1: Whenever I jump, then press punch or kick while he's in the air, he goe's back to the ground, and punches or kicks. I don't know how to fix this.
Problem 2: Okay, I DO NOT know how to make the enemy fight back. Many attemps have failed. I can't make the game until these errors are out of the way.
Please help if you can!
~Symbiotes
Ragdoll Fighting (my New Game)
ill attatch the fla soon
http://img471.imageshack.us/my.php?i...ightingfr0.swf
i know only basic ragdoll programming so i need someone to help me with...
a better collision system (aka he doesnt liek bleed to death when he gently touches the floor)
a dismemberment system (each joint seperates after taking a reasonable amount of damage)
less wall damage (only when he hits a wall at a reasonable speed will he take damage)
2-player (1p is black, 2p is white)
easier controls (1p controls his ragdoll (by the head) with the arrow keys, 2p uses w,a,s,d)
get rid of cursor drag (so they cant get dragged around by the cursor)
loss of head control (when a ragdoll is decapitated he will not be able to control himself or his head)
higher speed=higher damage (to other ragdoll, also to self if hitting a wall/ceiling/floor)
(when the ragdolls hit each other, the one with the lower speed is damaged, the one with the higher speed is not, if both have the same speed they dont take any damage to either of them, but if they just touch each other or something at a very low speed they will not do any damage to each other)
more resistance (the ragdolls are slightly slower)
PS you dont have to do everything on this list (but feel free to), you can do only one and ill be real happy! Plus ill try to do you a favor if a can!
Fighting Game Request
can i have actionscript for a player who will be able to finish punching before they kick
Scripting A Fighting Game Help
Hello all that reads,
I have my charcter(boxer) named my_mc on the main timeline if you double click inside this movieclip you see my boxer has a punch labeled frame, kick labled frame and a knee labled frame. above the labels I tried putting actions to return my boxer to his original state of standing but it dosent work??? this is my code in frame 1 on the main timeline:
// stop the mc
my_mc.stop();
// when you press a key
my_mc.onKeyDown = function()
{
// if it's the A key
if (Key.getCode() == 65) {
// send the movie clip's playhead to frame labeled kick
this.gotoAndStop("punch");
}
// if it's the S key
else if (Key.getCode() == 83)
{
// send the movie clip's playhead to frame labeled punch
this.gotoAndStop("kick");
}
// and so on
// if it's the D key
if (Key.getCode() == 68 {
// send the movie clip's playhead to frame labeled kick
this.gotoAndStop("knee");
}
};
// add the listener to the movie clip
Key.addListener(my_mc);
I have tried putting this.gotoAndPlay("punch"); instaed of this.gotoAndStop but then it will just play through all of his motions.
My question is how do I do it so that when I push "a" for punch the boxer punches and then returns his punch instead of being stuck whith his arm out until I hit the next button?
Hopefully Someone can help
michael
P.S. if anyone has a street fighter game or something like it could you send me the fla.file as a learning tool
Fighting Game Problems..
hey there, im creating a 2 player fighting game, and so far ive compleated 4 , fully working characters ( like with attacks, and movement) and some basic stages for them to fight on, but ive got 2 major problems..
the first is proberly not as major as the second. i have 2 Hp bars working, which were working fine when i had them decrease when the player movieclips touched each other ( just to see if the Hp bars would react ) but when i tried to combine them with the my characters.. only player1 seems to deal damage..
second of all, ( this being my MAJOR issue) i have no idea how to create a charatcer and stage selector menu. ive tried 2 tutorials i found, one didnt even work, and the seond only works for 1 player, but also screw around with the playable character chosen..
please if anyone is able to help me out by showing me, or linking me to a tutorial i'd be forever grateful. ( im a highschool student, and this is for an assingment.)
Actionscript Tutorial For A Fighting Game
like the title says, can someone please send me a file or a link for a tutorial on how to make a fighting game? here's what i want to make: 8-16 characters, a bunch of stages, secret codes, special moves, a pause button, etc.
I Need To Know Act. Scr. With A Character Select With My Fighting Game
I have the picture of the character select already done , and the p1 bar for the character select , but I don't know how to put action scripts on how to make the bar move to a character and to make the character show on screen and playable in next key frames . If I can , can I send the actual Macromedia Flash MX 2004 file , so that yall can tell me the correct actions , and I can understand more ?
Action Game Fighting Problems
Thanks for clicking..
,but i have a problem involving my fighting system..
i have a combo chain setup across 1 movie clip using ripped sprites
but when i let go i want it to stop...
Flash actionscript is not listening to me...
what should i do?
does anybody have any suggestions on what the code should look like?
plz help me.
Fighting Game:Character Change
HI
i have recently been working on a 2 player fighting game
but have encountered a problem. I want to make it so that there are two characters to choose from but i dont know how to do that without making the fight over and over again with all the different outcomes for example i would have to make it so there is a fight were player 1=character 2 and player 2=character 1 then iwould have to do
player 1=character 1 and player 2=character 2 etc..
so is there a way i can switch what characters are fighting based on what they chose at the menu?
P.S. i use flash 8
THANKS HEAPS
Drew
Fighting Game 'camera Angle' Position
I am making a fighting game and I have made an attempt to make a kinda moving camera effect. Bascially two movieclips are inside a container movieclip. When one movieclip moves back the container scales down ( zooming out ) and when the two movieclips are close together the container mc zooms in. The containers _x is inbetween the two movieclips.
This is the best iv tried to explain it - sorry its probably hard to understand what im doing. Here is my attempt at doing it but its not very good i was wondering if anybody has got a better way of doing it.
Fighting Game...why Does My Character Stops Moving After Running?
ok...in my fighting game....
-I made a movie clip named "Player1".
-I made a button in the first frame of the clip.
-I called the first frame "standing"
-The second frame is when running...
-This is the action of the button
on (keyPress "<Left>") {
gotoAndStop (2);
}
in this frame (2), I got another button with a movie clip inside (when the character is running.)
This is the action of the button on frame #2
onClipEvent (enterFrame) {
if (key.isdown(key.LEFT)) {
_x-=15;
}
}
onClipEvent (enterFrame) {
if (!key.isdown(key.LEFT)) {
gotoAndStop ("standing");
}
}
When I run the game, the character runs when I press the LEFT key but when he stops running, all the keyboard keys don't work if I repress on it...what's the problem????
Please reply!!
-=FL/SHMAN=-
Help I Am Making A Fighting Game With Actionscript (MUCH SIMPLER Than It Sounds....)
Hi, Im making a pseudo fighting game. Its actually just a animated showcase of some characters with some pre-set animations against each other.
Im having trouble with the menu system.
Basically, its unbelievably simple.
Menu 1. SElect 1 character out of 5. (will be put on left side of screen)
Menu 2 (same set up as Menu 1 but previously selected character will not be selectable) will be put on right side of screen
Fight screen- has selected Menu1 chracter on left side of screen
and selected Menu2 character on right side of screen.
I know the FLA file looks so cheap and half assed but the animation portion IS very detailed (for abegginer like me)
I was wondering if anyone can tell me what Im doing wrong because its not working or if you can point me in the right direction. thankyou very much!
Street Fighter Styled Fighting Game W/Twist
I'm a relatively new Flash developer and I have an *****ious project to help me better grasp everything Flash can do.
Here's my idea (and if it's been done, which most likely it has, let me know); I'm interested in creating a 2D Fighting game with the basic set up that is along the lines of Street Fighter and MK and such, but with a bit of a twist. Instead of just two pressing the key to execute the move, I want there to be the ability to have multiple moves that you can either click, or asign a corresponding button to. If any of you have every played an MMORPG such as World of Warcraft, then you have a good idea as to what I'm talking about.
Also, I want it to be 'preasure sensitive' in that, the longer you hold down the button the harder (but of course slower) the attack would be. I want attacks to be interupted by other attacks as well. This way, the skill comes in timing your attacks even more so in other games. I want to be able to have a bar to show hard you are hitting as well.
If anyone could help me out with atleast which sort of variables I need to use, that'd be great. I'm not asking for someone to code this for me. Just for a bit of help in some of the concepts.
By the way, I love this site. It has been integral in my progression as a Flash Developer. And I'm glad that I'm able to finally able to join the boards. Thanks alot everyone.
Fighting With Javascript
I've been battling with this code for days now. the url is http://www.magneticdreams.com If you click on the NEWS link on the bottom left, the window pops up fine. Inside that window, I have buttons that need to spawn other windows. As you will see, these links do not work. I know my paths are correct, it acts as if it isn't possible to spawn new windows from this one.
An example of the code on the buttons is below.
on (release) {
getURL ("javascript:NewWindow=window.open('http://www.magneticdreams.com/cc.htm','C&C News','width=560,height=400,left=200,top=25,toolba r=No,location=No,scrollbars=Yes,status=No,resizabl e=No,fullscreen=No'); NewWindow.focus(); void(0);");
}
Any help would be hugely appretiated.
Thanks,
P
Fighting Games
hey
i was wondering if there was a way to make a fighting game (eg tekken) on flash
obviously it doesnt have to be complex just with a few moves (eg kick, punch, etc ) i know itll probably be quite complex but any help that i can understand would b appreciated
Matt
Linked Mc-s Fighting
I made a mc with linkage, and it's a little mc with 5 frames, in each one a graphic instance, and that makes a little animation.
The problem is: When I attach two of those to the movie, and if they are close together, they don't work right. One of them always has problems, like showing only one of those 5 frames or not showing at all. They are each in there own depth, so I don't know where could be the problem.
Have you seen this? Did you fix it?
Thanks..
P.S. If I make one of those mc-s stop, the other one apears in all it's beauty, it's like one is stealing the graphis instances from the other, and if I tell one to stop using the instances, the other takes them. And all that only if they are close together. I don't know..
Two Scripts Fighting
I have 2 scripts, that by themselves work just fine. The first upon clicking moves items to the correct location. the second zooms the final item iin. when another button is pushed that itme is zoomed back out. when they are combined for soem reason the zoomItem holds the script from zoomIn and uses the settings fro zoomOut, but does not zoomOut. It loops back to the zoomIn script. Can anyone see where these scipts are fighting?
***frame 1: "start" ***
itteration = 0;
loc = "start";
increment = 1;
finalPosSet = ["36", "76", "116", "156", "196", "236", "276"];
countPosSet = finalPosSet.length;
countPos = 5;
currLoc = "home";
goLoc = "home";
***frame 2: "main" ***
stop();
loc = "main"
itemNum = "--BLANK--"
----buttons frame: 2 ---
button: "illust"
on(release){
goLoc = "illust";
if(currLoc == "home")
{
gotoAndPlay("code");
}else{gotoAndPlay("zoomOut")};
}
button: "prnt"
on(release){
goLoc = "prnt";
if(currLoc == "home")
{
gotoAndPlay("code");
}else{gotoAndPlay("zoomOut")};
}
// same for 'digital', design & home buttons
***frame 3: "code" ***
//Set MoveOrder Variable
if (currLoc == "home")
{
switch (goLoc) {
case "illust":
moveOrder=["5", "4", "3", "2", "1"];
finalPosX0 = finalPosSet[6];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "design":
moveOrder=["1", "5", "4", "3", "2"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[6];
finalPosX2 = finalPosSet[5];
finalPosX3 = finalPosSet[4];
finalPosX4 = finalPosSet[2];
break ;
case "digital":
moveOrder=["1", "2", "5", "4", "3"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[1];
finalPosX2 = finalPosSet[6];
finalPosX3 = finalPosSet[5];
finalPosX4 = finalPosSet[3];
break ;
case "prnt":
moveOrder=["1", "2", "3", "5", "4"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[1];
finalPosX2 = finalPosSet[2];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[4];
break ;
case "home":
moveOrder=["1", "2", "3", "4", "5"];
finalPosX0 = finalPosSet[1];
finalPosX1 = finalPosSet[2];
finalPosX2 = finalPosSet[3];
finalPosX3 = finalPosSet[4];
finalPosX4 = finalPosSet[5];
break ;
};
};
if (currLoc == "illust")
{
switch (goLoc) {
case "illust":
moveOrder=["5", "4", "3", "2", "1"];
finalPosX0 = finalPosSet[6];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "design":
moveOrder=["1", "3", "4", "5", "2"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[4];
finalPosX2 = finalPosSet[5];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[2];
break ;
case "digital":
moveOrder=["1", "2", "4", "5", "3"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[1];
finalPosX2 = finalPosSet[2];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[4];
break ;
case "prnt":
moveOrder=["1", "2", "3", "5", "4"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[1];
finalPosX2 = finalPosSet[2];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[4];
break ;
case "home":
moveOrder=["1", "2", "3", "4", "5"];
finalPosX0 = finalPosSet[1];
finalPosX1 = finalPosSet[2];
finalPosX2 = finalPosSet[3];
finalPosX3 = finalPosSet[4];
finalPosX4 = finalPosSet[5];
break ;
};
};
if (currLoc == "design")
{
switch (goLoc) {
case "illust":
moveOrder=["2", "3", "4", "5", "1"];
finalPosX0 = finalPosSet[3];
finalPosX1 = finalPosSet[4];
finalPosX2 = finalPosSet[5];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[1];
break ;
case "design":
moveOrder=["1", "3", "4", "5", "2"];
finalPosX0 = finalPosSet[6];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "digital":
moveOrder=["1", "2", "4", "5", "3"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[1];
finalPosX2 = finalPosSet[5];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[3];
break ;
case "prnt":
moveOrder=["1", "2", "3", "5", "4"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[1];
finalPosX2 = finalPosSet[2];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[4];
break ;
case "home":
moveOrder=["1", "2", "3", "4", "5"];
finalPosX0 = finalPosSet[1];
finalPosX1 = finalPosSet[2];
finalPosX2 = finalPosSet[3];
finalPosX3 = finalPosSet[4];
finalPosX4 = finalPosSet[5];
break ;
};
};
if (currLoc == "digital")
{
switch (goLoc) {
case "illust":
moveOrder=["3", "4", "5", "2", "1"];
finalPosX0 = finalPosSet[4];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[6];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "design":
moveOrder=["1", "3", "4", "5", "2"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[4];
finalPosX2 = finalPosSet[5];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[2];
break ;
case "digital":
moveOrder=["1", "2", "4", "5", "3"];
finalPosX0 = finalPosSet[6];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "prnt":
moveOrder=["1", "2", "3", "5", "4"];
finalPosX0 = finalPosSet[0];
finalPosX1 = finalPosSet[1];
finalPosX2 = finalPosSet[2];
finalPosX3 = finalPosSet[6];
finalPosX4 = finalPosSet[4];
break ;
case "home":
moveOrder=["2", "3", "4", "5", "1"];
finalPosX0 = finalPosSet[2];
finalPosX1 = finalPosSet[3];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[5];
finalPosX4 = finalPosSet[1];
break ;
};
};
if (currLoc == "prnt")
{
switch (goLoc) {
case "illust":
moveOrder=["5", "4", "3", "2", "1"];
finalPosX0 = finalPosSet[6];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "design":
moveOrder=["1", "5", "4", "3", "2"];
finalPosX0 = finalPosSet[1];
finalPosX1 = finalPosSet[6];
finalPosX2 = finalPosSet[5];
finalPosX3 = finalPosSet[4];
finalPosX4 = finalPosSet[2];
break ;
case "digital":
moveOrder=["1", "2", "5", "4", "3"];
finalPosX0 = finalPosSet[6];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "prnt":
moveOrder=["1", "2", "3", "5", "4"];
finalPosX0 = finalPosSet[6];
finalPosX1 = finalPosSet[5];
finalPosX2 = finalPosSet[4];
finalPosX3 = finalPosSet[3];
finalPosX4 = finalPosSet[1];
break ;
case "home":
moveOrder=["3", "4", "5", "1", "2"];
finalPosX0 = finalPosSet[3];
finalPosX1 = finalPosSet[4];
finalPosX2 = finalPosSet[5];
finalPosX3 = finalPosSet[1];
finalPosX4 = finalPosSet[2];
break ;
};
};
// Implement the set variables
moveX0 = moveOrder[0];
moveX1 = moveOrder[1];
moveX2 = moveOrder[2];
moveX3 = moveOrder[3];
moveX4 = moveOrder[4];
itemNum = this["moveX" + itteration];
currItem = this["sqMc" + itemNum];
//final pos
finalPos = eval("finalPosX" + itteration);
speed = 1;
moveItem = "moveItem"+(itemNum);
currPos = (currItem)._x;
loc = "code";
itterationOld = itteration;
// SET DIRECTION
if(currPos < finalPos){
speed = 2;}
else{speed = -2;}
// MOVEMENT
currItem.onEnterFrame = function () {
if(currPos == finalPos){
moveItem = "no-"+(itemNum);
gotoAndPlay("stop-3-end");
}
else{
moveItem = "yes-"+(itemNum);
currItem._x += (speed);
currPos = (currItem)._x;}
};
*** frame 4 ***
stop();
***frame 5: "stop-3-end" ***
//itteration ++;
//itterationOld = itteration
itteration = (itterationOld)+(increment);
loc = "stop-3-end";
if (countPos > itteration)
{
gotoAndPlay("code");
}else{gotoAndPlay("zoomIn");
currLoc = goLoc;};
*** frame 5: "zoomIn" ***
itteration = 0;
zoomItem = eval("sqMc"+moveOrder[4]);
scale = 30;
currXscale = zoomItem._xscale;
state = "zoomIn";
//this scales our clip along the x axis SCALE % every frame until it reaches a certain width
zoomItem.onEnterFrame=function (zoomIn)
{
state = "zoomIn-start";
if(this._xscale>=330){
state = "zoomIn-end";
gotoAndPlay("zoomIn-end");}
else if(this._xscale<330)
{
state = "zoomIn-move";
this._xscale+=scale;
this._yscale+=scale;
};
};
if(zoomItem._xscale>=330){
state = "zoomIn-end";
gotoAndPlay("zoomIn-end");}
*** frame 6: "zoomOut-end" ***
zoomItem = 0;
scale = 0;
currXscale = 0;
state = "zoomIn-End";
stop();
*** frame 6: "zoomOut" ***
zoomItem.onEnterFrame=null;
zoomItem.onEnterFrame=function (zoomIn)
{
null
};
zoomItem1.onEnterFrame=function (zoomOut)
{
null
};
currXscale1 = 0;
state = "ZoomOut";
scaleDown = -50;
size = 340;
newSize = 0;
zoomItem1 = eval("sqMc"+moveOrder[4]);
currXscale1 = zoomItem1._xscale;
//this scales our clip along the x axis SCALE % every frame until it reaches a certain width
zoomItem1.onEnterFrame=function (zoomOut)
{
state = "zoomOut-start";
if(zoomItem1._xscale<=100){
state = "zoomOut-end";
gotoAndPlay("zoomOut-end");}
else if(this._xscale<100)
{
state = "zoomOut-move";
zoomItem1._xscale+=scaleDown;
zoomItem1._yscale+=scaleDown;
};
};
if(zoomItem1._xscale<=100){
state = "zoomOut-end";
gotoAndPlay("zoomOut-end");}
*** frame 6: "zoomOut-end" ***
state = "zoomOut-Done";
stop();
Sword Fighting
Hey all, need some help on something. I wuz wondering how to animate sword swinging and such in flash. Everytime I do it, the sword just goes wild and out of proportion. is here a way to make this easier or workable. Thx all.
Code Fighting With Each Other.
Hello all actionscripters,
I am an intermediate scripter in AS2. I am helping a friend out with a site. I have two different sets of code fighting with each other to cause a problem within the file.
So I have some code for a email message section plus code that works for my navigation.
If I get one working the other doesn't. So I will post the file if anyone can help.
www.khdesign.ca/help/index.zip
I appreciate the help in advance.
Khester
Stick Fighting
Could someone give me a link, or help, on how to make good stick fights and animations, I need help ò_ô. I also want it like those off www.xiaoxiao.com , as in, their 3d effect etc. Please ^_^
|