Dart Game Question
I have a board with 20 spaces 20x40, like a rectangular dart board. A dart is supposed to hit one of the spaces one frame at a time and the last space (number) left wins.
The darts direction is determined by a text or xml file with 20 numbers 1-20. If 10 is the first number then the dart should hit space number 10 which is x.200 y.100.
Is this possible?
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-24-2007, 03:34 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dart Game
does anyone out there know how to make a dart game where the traget moves???
Dart Game
Problem!!! cry for help I have just created a dart game but want to show an spinning movement between when you release the button and when it hit on target could anyone help me with my cry (there the actionscript)
//INIT SOUNDS
var Snd_alert_good:Sound = new Sound();
Snd_alert_good.attachSound("alert_good");
var Snd_alert_bad:Sound = new Sound();
Snd_alert_bad.attachSound("alert_bad");
//BUILD SCALING ARRAY FOR DART
var perspective_scalefactor:Number = 0.998;
var scale:Number = 100;
var max_dist:Number = 500;
var scalearray:Array = new Array();
for(var dist:Number = 0; dist<= max_dist; dist++){
scale *= perspective_scalefactor;
scalearray.push(scale);
}
//WAIT FOR USER TO INITIALTE PLAY
stop();
//DEFINE DISTANCE TO OUR BOARD
var boardDist:Number = 400;
//||||| DEFINE CONTROLLER OBJECT |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||
var controller:Object = new Object();
//AIM CONTROLLER
controller.aim = function(){
this._x = _xmouse;
this._y = _ymouse;
}
//RELEASE CONTROLLER 1 (PRESS)
controller.shoot_click = function(){
this.startTime = getTimer();
this.start_x = _xmouse;
this.start_y = _ymouse;
}
//RELEASE CONTROLLER 2 (RELEASE)
controller.shoot_release = function(){
this.endTime = getTimer();
this.end_x = _xmouse;
this.end_y = _ymouse;
//CALCULATE OFFSETS
var xoffset:Number = Math.abs(this.start_x - this.end_x) + 1;
var yoffset:Number = Math.abs(this.start_y - this.end_y) + 1;
var distance:Number = Math.sqrt (Math.pow(xoffset , 2) + Math.pow(yoffset , 2));
var elapsedTime:Number = this.endTime - this.startTime;
var speedfactor:Number = (distance/elapsedTime*10)-10;
//CREATE AIRBORN DART
duplicateMovieClip(this, "dart_hit", 1);
_root.game.dart_hit.fall = 7;
_root.game.dart_hit.speed = 40 + speedfactor;
_root.game.dart_hit.lift = _root.game.dart_hit.speed*.8;
_root.game.dart_hit.lateraloffset = (this.start_x - this.end_x)*0.15;
_root.game.dart_hit.pos_x = this.end_x;
_root.game.dart_hit.pos_y = this.end_y;
_root.game.dart_hit.pos_z = 0;
//ACCOUNT FOR PEOPLE THAT MIGHT DO IT BACKWARDS -- IT HAPPENS
if (this.start_y > this.end_y){
_root.game.dart_hit.lateraloffset *= -1;
}
//HIDE AIMER DART AND THROW DART
_root.game.dart_hit.onEnterFrame = controller.fly;
_root.game.dart._visible = false;
_root.game.dart.onMouseUp = null;
}
//FLY CONTROLLER
controller.fly = function(){
//TRANSLATE DART
this.pos_x += this.lateraloffset;
this.pos_y -= this.lift;
this.pos_z += this.speed;
//SCALE AND POSITION
var scalefactor:Number = _root.scalearray[Math.round(this.pos_z)];
this._xscale = scalefactor;
this._yscale = scalefactor;
this._x = this.pos_x
this._y = (this.pos_y * (scalefactor * .01));
//ADJUST DYNAMICS
this.lift -= this.fall;
this.speed *= 0.96;
//CHECK FOR HIT
if((this.pos_z >= _root.boardDist) ||(this.pos_y >= 2000)){
//PLAY HIT ANIMATION
this.gotoAndPlay("hit");
//GET SCORE
var pointvalue:Number = _root.getScore(this._x, this._y);
//DISPLAY SCORE
_root.game.attachMovie("point_display" , "point_display", 3);
_root.game.point_display._x = this._x;
_root.game.point_display._y = this._y;
_root.game.point_display.pointvalue = pointvalue;
//INCRIMENT THROW COUNT
_root.throws++;
//CHECK STATUS
if(_root.score - pointvalue == 0){
//CLOSE OUT
_root.score = 0;
_root.alerttext = "CLOSED! YOU GOT IT!!";
_root.alert.gotoAndPlay(2);
_root.Snd_alert_good.start();
var intervalID = setInterval(function(){gotoAndPlay("game_over");cl earInterval( intervalID );}, 1500);
}else if(_root.score - pointvalue < 0){
//BUST
_root.alerttext = "BUST! (MUST CLOSE OUT EXACTLY)";
_root.alert.gotoAndPlay(2);
_root.Snd_alert_bad.start(0,2);
_root.game.dart._visible = true;
_root.game.dart.onMouseUp = controller.shoot_release;
}else{
_root.score -= pointvalue;
_root.game.dart._visible = true;
_root.game.dart.onMouseUp = controller.shoot_release;
}
//DIABLE THIS DART
_root.game.dart_hit.onEnterFrame = null;
}
}
//||||| SCORE FUNCTION |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||
function getScore(darthit_x, darthit_y){
//IDENTIFY CENTER OF BOARD
var boardcenter_x:Number = _root.dart_board._x;
var boardcenter_y:Number = _root.dart_board._y;
//DEFINE BOARD DIVISIONS (RINGS)
var division_1:Number = 20;
var division_2:Number = 40;
var division_3:Number = 50;
var division_4:Number = 90;
var division_5:Number = 100;
//DEFINE SLOT POINT VALUES
var slotArr:Array = new Array(5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5);
// CALCULATE OFFSETS
var xoffset:Number = darthit_x - boardcenter_x;
var yoffset:Number = darthit_y - boardcenter_y;
var tangent:Number = Math.sqrt(Math.pow(Math.abs(xoffset),2)+Math.pow(M ath.abs(yoffset),2));
var angle:Number = (Math.atan2(yoffset,xoffset)*180/Math.PI)+90;
if(angle<0){angle = 360+angle;}
var slot:Number = Math.floor((angle+9)/18);
// ASSIGN POINT VALUE
if(tangent<=division_1){pointvalue =25;}
else if(tangent<=division_2){var pointvalue:Number=slotArr[slot]*1;}
else if(tangent<=division_3){var pointvalue:Number=slotArr[slot]*3;}
else if(tangent<=division_4){var pointvalue:Number=slotArr[slot]*1;}
else if(tangent<=division_5){var pointvalue:Number=slotArr[slot]*2;}
else {var pointvalue:Number=0;}
return pointvalue;
}
Regrads Just a Dog!!!
Dart Game Scores
I am working on a Dart game in flash and its almost done.
Just need help in displaying scores i am using hittest for the scores
Example: The dart board has five sections (round circles) i am naming the each section as different movieclip and on fixing a particular score for each like for outer first circle it is 10 pt and the 2nd circle is 20 pt.
when the dart hits the circle the score is displayed.
I dont have complete knowledge of AS please help me.
Dart Game - Paths In Actionscript.
Hi. I will try to make this as readable as I can
I'm trying to make a "darts" game.
I have a movieclip added dynamically, and it's a library item that already has items in it (different movieclips named from hit1 - hit20).
I also add a dart every time I click the mouse (obviously). Info about these darts are stored inside objects.
How can I make a loop that searches through, and finds which of hit1-hit20 the current dart had hit?
I've tried this (simplified to bare bones):
ActionScript Code:
// darts objects
sent = 0;
darts = [0];
for (i=1;i<=3;i++) {
var dart = this["dart" + i];
dart = {};
dart.obj;
dart.depth = 10+i
dart.x = 0;
dart.y = 0;
darts.push(dart);
}
// board
var board:MovieClip = attachMovie("board","board",1);
// this happens when user clicks mouse
onMouseDown = function() {
sent += 1;
darts[sent].obj = attachMovie("dart", "darts" + darts[sent].depth, darts[sent].depth);
dartHitArea = getWhichHitArea(darts[sent])
}
// this is my attempt on the loop
function getWhichHitArea(dart:Object) {
for (i=1; i<=20; i++) {
hitname = "hit"+i;
if (board[hitname].hitTest(dart.x,dart.y,true)) {
trace("hit" + hitname);
// do actions here
}
}
}
If I've left out some code, let me know and I'll add it if I've created it :P
What I dont' understand, is that even if my dart hits area board.hit20, my trace within the if(board[...].hitTest(...)) does not type.
I guess it's my naming, the board[hitname], that doesn't work. Anyone with an idea of how I can fix this?
Thanks
Help With Dart Target
Hi
Well I was making a dart game and you score by hiting different parts of the target. Well its circle. I want it to hit the circle you no what I mean like say somthing circle and you trun it into a mc well the box around the mc. Say you hit it with a dart well if you hit the corner of the box it adds points and instead of a box I want it in the shape of the mc you get? thanks
Dart Motif Ad Kit
Wondering if anyone else has noticed this problem before. When I have the Motif Ad Kit panel up in the authoring environment, I have problems entering anything in the x, y, h, w fields in the property panel and the transform panel. The problem seemed to go away when I closed the panel but I just wanted to put out feelers to see if it was just me or my setup.
Dart Problem
What the problem is that when I realease the dart it dont work.
Code:
on (press) {
startDrag("", true);
this.gotoAndStop(2);
}
on (release) {
stopDrag();
this.gotoAndPlay(3);
}
When I realease my mouse is what i shpould say it dont do those following actions.
I cant believe I have this mini of a problem that i just cant fix.
Attached File
Dart Motif Ads
anybody know of a good tutorial for creating dart motif ads? I know absolutly NOTHING about making them. Any direction you can point me in?
http://www.macromedia.com/software/flash/motif/
Dart Board Banner HELP
Hello, I've attached a file (test.fla) that I'm having touble with. It's obvious what I want it to do. I want the mouse to turn into the dart button when it's over the banner. But I want it to be clickable so when the dart hits the round button I have going up and down with the board, it will open a webpage in a new window. If you have any ideas that would be cool. Also, whenever I go mouse hide it screws up the rest of the flash on my page. Is it possible for 1 webpage to have 2 or 3 Flash movies, and only hide the mouse over top of one? Thanks A LOT!!!
kal
Flash Ad Kit - Expandable Ad Without DART Motif Features?
Hi, this is my first post here so I'd like to start out by saying that I love the site and I'm very appreciative of all the members here who's post have gotten me through so many flash problems.. thanks to you all! Hopefully one day I will know enough about flash do do some question answering of my own.
Now I'll get to my problem.
I basically want to be able to make an expandable ad with transparent background (EXAMPLE) using the flash ad kit for DART Motif, but I don't need all the DART Motif stuff. All I want is for the ad to be able to drop down over my existing html content.
Is there any way to do this with just an SWF file and some javascript code rather than having to make MTA and MTF files??
I was looking at the code generated by the flash ad kit panel's preview function and that's pretty much what it looks like they did to make it work. My problem with that is that there must be hundreds of lines of code there for the Motif functionality that I don't need. If it wasn't for all that stuff I could just cut and paste the javascript code from the preview into my pages.
Can anyone maybe suggest what lines i could take out and what to change in order to just have the code necessary to display the transparent and resizing stage?
Alternatively, would it be possible for me to use the MTF file on my page rather than do all that code editing? How does an MTF file work? Will it only work with DART Motif? OR, is there a version of the ad kit that doesn't have the Motif features? that would be best probably but i can't find anything.
Thanks for looking,
Dj Hai
Needs EXPERT Help: 1. Save Game For Replay, 2. Reset Game
I'm rather new to Action Script, but doing not bad. I have searched the Board, found a link to a tutorial on ActionScript[Org], titled: "save a local copy of file". But that was yet not clear enough for me.
2 Questions at the moment (files attached):
1. Save Game for Replay: How can I save the set to a file in the Same Folder so it could reload for further play from that point on?
2. Reset Game: How can I Reset the Game for a NEW Attemp? I need to remove all Actors at once, to start a new game, without closing this SWF and reopenning it.
If you'd be so kind as to explain very clearly, and add Action Script, taking into consideration that I still get confused by trying to deal with Arrays and so. I promise to study your lesson carefully - this GameTest attached is the fruit of this week studies.
THANKS A LOT
Nit Kalish
Flash Game Help The Game Runs Too Slow In A Browser
lo there!
I'am so frustrated!
I have made a plattformgame in flash, and after I had published it I tested it (local) when it was embedded in a browser, and it hacks and laggs! But when I play it in the flash player it works just fine.
What should I do?
I removed all the heavy graphics, lowerd the fps to 30fps and removed all the code so now its just the bassis left (gravity, collision, key checking etc. and yes u should bounce on the walls giving a wall jump effect).
Anyone please! I am in big need of help!
Is it my code? Did I publish it wrong?
here are the links:
http://smh03.lbs.se/smh03niklas/prof...ofilbollen.swf
http://smh03.lbs.se/smh03niklas/prof...ofilbollen.fla
http://smh03.lbs.se/smh03niklas/prof...filbollen.html
//Qui
How To Disply Time In Game And How To Stop After The Game..
Hi all,
i need help on drag and drop game...
i have done the drag and drop function, for this game timer has to be shown, after user finishes the drag & match, it should give finish alert and time taken for this game (please tell me also how to stop time after he finish the game) is to be sent to some external file or some database...
can it be done?
i have attached the .fla file also..
[F8] Game Studio Needs Flash Game Programmer
Hi -
I've been working on cartoon Flash interfaces for awhile. Now my clients want games, so I'm looking for one or two Flash game actionscripters who can help out and maybe start a studio. Since it's a startup, I'm looking for someone who's good, but not yet making millions - hoping we can do that ourselves eventually. Someone dependable, easy-going and easy to get along with. Would be great to find someone relatively local, but not absolutely necessary.
We'll be creating custom Flash games for an existing client.
Hoping to check out people's games first.
J.
[F8] How Can I Make A Game With Levels And A Game That Restarts?
I know this sounds stupid, but I just can't figure it out. I need to make a platform game. I'm fine with making a points system and a scrolling background and it functions but I don't know how to get the player to touch an object, or reach a goal and then transport to another level...I don't want to make the user have to click something to go to a new level.
Also, when the character hits an enemy, I can make it die, but I don't know how to make a button or something appear saying 'Game Over - Try again', so they can pretty much restart the level.
Hopefully someone can help me.
Regards,
Andrea
Help With A Game.. Game Is Running Slow In Browser..
I am working on this game for work and for now all i have is placeholder art for the most part and nothing very heavy on the graphics end yet my game is running very slow.. i bumped the FPS to 60 since at 30 i was getting image tearing or a double vision effect.. the upped FPS fixed that but the game is still running very slow. To give you an idea of what's going on i have different intervals running so different things can happen at different times.. there are 2 constant onEnterframes for the 2 enemies flying around the screen.. there is 1 for the main loop, 1 for the character, 1 for whenever tickets generate which removes itself and deletes the enterframe when they disappear, 1 for the wrecks that occur on level 2 which also remove themselves and delete enterframes for themselves, and 1 for a holder that handles all the money flying in which removes themselves as they collide with the player or leave the screen. All enterframes that run during gameplay delete themselves at the end of each level and re-initialize at the beginning of the next.
I can't figure it out.. please take a look at the fla and html files attached. Could it be just the sheer size of the game screen.. should i make it about half the size?? I appreciate any help and thank you.
Also the game's scripted animations seem to be running a little choppy if you watch their movement closely like there is a little glitchy jump every second or so.. is this fixable?
AS Help Needed In Game(i Will Give Credit In Game If You Help)
ok so basicly this is my game so far
23.swf
my probelm is that i want to make my charcter a flame and the tips of his head will move depending on the direction you are going.
So here is basicly this what its like
Moving left-Flames bend to right
Moving left and down-Flames bend at an angle between the left and down
Moving Down-Shorter Flames
Moving Up-Stretched Flames
etc...
ill put borders on after i get the flames down
Updating Game Stats During Game
B"H
hi - happy new year
i have a small problem - i run a college sports website - i want to update game stats during the game and ppl would go my website and access the stats as i type them - they are in microsoft database and i have php cgi flash mysql on my server (just not asp) and i want it to be that as i type the scores and then switch cells w/o uploading the new file - flash could still access the files from my computer and update the page auto - (it could load the files from my i.p. addy)
what is the best way to do this - do you have any examples?
thanks
yechi
[CS3] Snake Game, Game Size
I'm using this snake game code from the old Nokia phones. The game takes place in a 150X150 square, i want this to be 384X512 but ideally it would be in a var so it can be changed easily. Can anyone help?
PHP Code:
var unit = 15;//size of snake partsvar uwh = 20;//?var canMove = false;var dir = 2;var score = 0;aPieceList = new Array();mouseListener = new Object();mouseListener.onMouseDown = function(){ if (!canMove) { canMove = true; startGame(); }};Mouse.addListener(mouseListener);k = new Object();k.onKeyDown = function(){ var k = Key.getCode(); if (k == Key.UP && dir != 2 && canMove) { dir = 0; canMove = false; } else if (k == Key.LEFT && dir != 3 && canMove) { dir = 1; canMove = false; } else if (k == Key.DOWN && dir != 0 && canMove) { dir = 2; canMove = false; } else if (k == Key.RIGHT && dir != 1 && canMove) { dir = 3; canMove = false; }};Key.addListener(k);function addPiece(){ var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length); p._x = aPieceList[aPieceList.length - 1]._x; p._y = aPieceList[aPieceList.length - 1]._y; aPieceList.push(p);}function moveFood(){ var moveIt = true; while (moveIt) { food._x = Math.floor(Math.random() * uwh) * unit; food._y = Math.floor(Math.random() * uwh) * unit; moveIt = false; for (var i = 0; i < aPieceList.length; i++) { if (aPieceList[i]._x == food._x && aPieceList[i]._y == food._y) { moveIt = true; } } }}function gameOver(){ delete this.onEnterFrame; tScore.text = "You Lose. Score: " + score; canMove = false;}function startGame(){ for (var i = aPieceList.length - 1; i >= 0; i--) { aPieceList[i].removeMovieClip(); aPieceList.pop(); } score = 0; var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length); aPieceList.push(p); p._x = 10 * unit; p._y = 10 * unit; var food = this.attachMovie("food", "food", -1); var c = 0; moveFood(); var startingLength = 3; for (var i = 1; i < startingLength; i++) { addPiece(); } this.onEnterFrame = function() { canMove = true; tScore.text = score; for (var i = aPieceList.length - 1; i > 0; i--) { aPieceList[i]._x = aPieceList[i - 1]._x; aPieceList[i]._y = aPieceList[i - 1]._y; } if (dir == 0) { aPieceList[0]._y -= unit; } else if (dir == 1) { aPieceList[0]._x -= unit; } else if (dir == 2) { aPieceList[0]._y += unit; } else if (dir == 3) { aPieceList[0]._x += unit; } if (aPieceList[0]._y / unit == 20) { aPieceList[0]._y = 0; } else if (aPieceList[0]._y / unit == -1) { aPieceList[0]._y = 19 * unit; } else if (aPieceList[0]._x / unit == -1) { aPieceList[0]._x = 19 * unit; } else if (aPieceList[0]._x / unit == 20) { aPieceList[0]._x = 0; } if (aPieceList[0]._x == food._x && aPieceList[0]._y == food._y) { score += 10 * aPieceList.length / 2; moveFood(); addPiece(); } for (var i = 1; i < aPieceList.length; i++) { if (aPieceList[0]._x == aPieceList[i]._x && aPieceList[0]._y == aPieceList[i]._y) { gameOver(); } } };}
Save Game/load Game
How do you get the browser to remember all the variables and what point you're in on the timeline when you press "Save Game," and how do you get it to reload those variables when you press "Load Game." Is this some extremely complicated process?
How To Save A Game And Load A Game?
I don't know the codes that can make a game can be saved and be loaded. I have been trying out some codes but they doesn't work. So, can anyone help me please? Im using Flash MX 2004 and Im doing a standalone game.
So, how to make it? Can teach me step by step? Please??
Card Game (turn-based) - Lobby Room And Game Room, Maintain State
Hi all, I´m new in this forum, since now i appreciate for any help.
I´m developing a turn-based card game in Flash 8 (multiplayer), using the concepts of lobby and room. In this case when the user login de game, he always see the lobby, where he can choice the games, then the user selects a game in a dataGrid and enter the game.
Inside the game (that resides in another frame in my .fla), there is a button that when clicked brings de users to the main lobby ( gotoAndStop(“lobby”) ) so that the user can visualize the lobby with the game running in background with the others users.
The problem is when the user return to the game ( gotoAndStop(“game”) ), the images, cards, players name and chat history text disappear, all the game object disappear, remaining only the original graphics (movie clips) to the game room.
In fact, I need a solution to maintain the state of the game when the user decide to visualize the lobby (with the game running) and after return to the game.
Thanks for any help.
Regards,
Luiz Filipe (CURURU)
Os: Sorry for my bad english -
Game Control Panel --> How2make Object Appear In Control Once Discovered In Game
Hey all you flashies,
here's a problem to scramble the flash nerves. I'm creating a game for my Major project and I want to have a control panel at the bottom. The aim of the game in brief, is to collect 6 pieces of fruit (just an example). These 6 pieces of fruit will be found in different order depending on which route the player takes in the game. What I want to happen is each time the player finds a fruit, I want it to appear in the control panel. How do I go about doing this? Can anyone help? Much appreciated! If anyone has an example to something similar to this it would be much appreciated if I could see it! thanks!
My Game....matching Game.
this my example for my game that i have create,can anyone help me and what really wrong with my game,coz the picture not appear went i execute this file.......really need help on this
[F8] Tips On This Game?(my First Game)
I'm making this here game where you walk around a shop, check out the games and movies etc... in the aisles and if you want to buy one, a form gets sent to me. Also there's a TV room with some videos and arcade room with flash games. I did this cause i'm selling my games and movies etc... and i thought this would be useful.
So any tips about how to improve it? what more to add?
Game Help(project Game)
Ok I make a simple game but I need more people in my game project take me contact in e-mail.Now I show what people I need.First I need good actionscripts people.I need only good actionscripts people ty and goodbye.
Help Doing Game
Hi everybody!
Can any of you tell me how to do this?
I´m making a game about a space ship which fires a laser and moves around the screen. My problem is that I want it to fight against asteroids, so I need to do that when the laser hits an asteroid it explodes and then appears randomly again in the screen.
I have already solved the part of the laser shot and the part of the spaceship´s movement, but I can´t do the other part right enough!
My problem is when I fire the laser and when it hits the asteroid I can´t duplicate the asteroid Movie Clip.
If anybody knows how to do this or where I can´t download a tutorial I will appreciate it very much!
Thank you very much!
Help With Game...
I'm creating a game for teachers called "alphabet soup".
The letters go into the bowl and the question appears on the left hand side. I then ask the teachers to drag the correct letters into boxes that appear below the bowl.
e.g. This organization is in the sports entertainment business.....W W F. What I want is when the correct letter is placed in a box it turns green, if its wrong the box will turn red. Can anybody help me out with some script for the boxes that will allow me to make a specific letter turn the box either red or green.
Thanks
Mike
Help Me For A Game Plz
Well I've plenty of MC named wall1 , wall2 , wall3......
wall45668789.
I want to make a collision check with a simple MC named Car.
I don't want to make hundred lines like this one :
if ( _root.car.hitTest(_root.map.wall56)){
How can I call every MC with wall in their occurence name.
Something like ["wall"]+i but I don't success.
Thks for all.
Help Me With This Car Game
HI
I'm currently working on this game.
http://www.multimania.com/pio/Game/game.html
but it is f*cking slow on small PC.
I want to put it in intermediate quality but it doesn't work
I've got a little problem with the collision too ( you'll see)
So if someone want to help me a little ( an idea to make it faster than ever !!)
Thks for all
Game Help
im making a game and i dont know how to make it so the guy you move around can go on certain thing, but when he runs into a building or something he stop when hits the wall. thanx for your help
________
Game (oh My God) HELP
Hello world!!
I am making a game, i am very newbie so i need help. What i want is to only get one point when i shoot an enemy, but now i get points when i hit the explotion too. Heres the code for the gunshot:
for (i=1; i<=_root.numEnemy; i++){
if (this.hitTest( _root["enemy"+i]) and thi**** == 0){ <--
thi**** += 1;
_root.score+=random(100);
_root.down+=1;
_root["enemy"+i].play();
_root.spaceship.laserCounter--;
this.removeMovieClip();
}}}
I would apreachiate some answers!!!!
thnx guys!!
-
ZoPhA zopha.cjb.net
[Edited by zopha on 07-06-2001 at 07:56 PM]
Help With Game
Im trying to make a game but im confused by ALL the tutorials. I need a way to make The main guy (A cute little wolfie) Move forwards when you press the Right arrow key and up n down, ect. but i know how to set the speed and how you need that Onclipevent stuff too but I do all of this and it never works...And where are you aspose to type in This._X= ect code anyways ???Im very much confused.....And if its not to much trouble how do you Teporaily disable Keys ?
SOS Game SOS
I need some scripting help... 'please'! I have 6 images, 3 are of pics animals, 3 are the names corresponding to each animal. I am trying to set up a 'MEMEORY game' for small children. Scripting is not my strong point and after 2 weeks of daily digging, I am no closer to the answer. If ANYONE has a moment or two to help me do this in the simplest way I would be EXTREMELY grateful. I just cannot seem to get a handle on how I would write the script and although I DO have some books now, it still isn't making logical sense to me yet. ( If you can help, this would be terrific and very much appreciated believe me! Thx in advance!
Help With Game
Im trying to make a game where you get points for hitting targets. What i need to know is how to do the actionscripting for adding points to the score (which will be in a dynamic text box)
an example or the code would be very helpful!
Help On Game
Help on game
Hi all
I have stage size of 600x300 pixel
I am trying to make man walk on key press(arrow left and right)and jump 20 pixel on key press space.
a little mario bro effect
How do I do this?
PilotX
Game Help, Please ?
Need help in development of game. 5 questions to be answered by user. 1 right answer gives user 1000 points ; rest of the four wrong answers gives user a negetive point (each of a different value). The total points gained and lost is shown at the end thru a dynamic text variable.
The problem is that at the response from the user, a pop-up lets him know whether user was right or wrong. Due to this, the points are getting lost. There is no display of points whatsoever.
HELP PLEASE
Game....
Hello,
I'm making a game, for this discussion let's say it's a little ball, and i have it going through a maze(it'll be kind of like zelda when i'm done), and i give the user control to move the ball. NOw, my problem is that i want to know how i can keep the ball in the constraintls of the maze, so that the person can't like jump over wallz but actually keep in the path, so that when they walk toward a wall the ball just stops. Will i need to plug in these coordinates individually? Or is there another way to do it? If there is could you give me a quick example please?
Thank you all,
phara0h^
Game Help
I have a .swf where a user can drop and drag elements on the screen to make there own picture. Is there a way to save those actions and submit that revised .swf through email or convert .swf to .gif and then email. All entries would be part of a contest.
Any assistance, additional information or other ideas would be appreciated.
Game Help
Anyone here Know how to make virtual cop style games??? I need help with limited ammo and how to make it so you can reload, I'm not to talented with action script but help if you can please...
Web Game
i want to make a web game that involves sending information to other people on the other side of a server. this game is about snipers and u shoot other people on other computors.
HELP ME PLEASE!!!1
Age Game
I have created an age game banner where the viewer must be over fifty to be eligible for a service.
If he is 50 or over he will see one thing. If he is under 50 he will see something else.
I need help with the code so that Flash will recognise that the user has keyed in a number that is smaller than 50 or 50 and over. I can then display the relevant content.
I hope someone can help me. Thanks.
Game Help
I was creating a simple game with the help of Building Games in Flash5 Part1: Player Movement and Fire. I manged to make my footballer move but he can't shoot with with the ball. All it does is at the start is fly across the screen and disappers and i get any more to shoot. Here is the code: The football player is called foot and the football is called laser
Under Foot
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter++;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE)) {
laserCounter++;
_root.laser.duplicateMovieClip("laser"+laserCounte r, laserCounter);
_root["laser"+laserCounter]._visible = true;
}
if (Key.isDown(Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._x -= moveSpeed;
}
if (Key.isDown(Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y -= moveSpeed;
}
}
Under laser
onClipEvent (load) {
laserMoveSpeed = 20;
this._y=_root.foot._y;
this._x=_root.foot._x=20;
}
onClipEvent (enterFrame) {
this._x+= laserMoveSpeed;
if (this._x>600) {
this.removeMovieClip();
}
}
flash says the script contians no errors. Please reply as soon as you can!
Age Game
I have created an age game banner where the viewer must be over fifty to be eligible for a service.
If he is 50 or over he will see one thing. If he is under 50 he will see something else.
Thanks to the Flashkit boards, I managed to sort this out.
I now have a new problem. If the user types in in letters instead of numbers, I get strange results.
The code thusfar looks like this.
on (release) {
if (parseInt(age)>=50) {
getURL ("http://www.xxxxxxxxxxxx", "_self");
} else {
gotoAndPlay ("Scene 1", "young");
}
}
Can anyone help me?
Thanks.
Game
Hi, me and my friend are trying to make a game on flash mx, and we need some help. the game is supposed to be in the format like zelda (for gameboy or snez) or like final fantasy (for snez) or like pokemon. we managed to make a small test game, though it took a long time, becouse we had a different keyframe for every place the character could be, and we had to write : on keypress:left goto frame 9 and so on froe every keyframe. can someone explay a more efficient and easier (and better) way, we would be VERY greatfull. using an actionsript or something that goes for the entiresequence. and is there maybe a way that we dont need to make all those keyframes...?
thatnx in advance, sencerly shinji and snorkelfarsan
|