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




Flash MX Game Hi -score Tracker



Hey all, I was looking for a little enlightenment -
I have made a game in Flash MX, and it is a time based game, the object being to complete obstacles in the shortest amount of time - Does anyone know how I can create a separate web page that can be accessed through a "register" button on the Flash game, and have your hi-score posted on that page, including a screen name, from best at top to worst at the bottom?
Source code, websites or any other resources is greatly greatly appreciated!

thanks
---->FP



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 09-09-2003, 12:16 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Flash MX Game Hi Score Tracker
Hey all, I was looking for a little enlightenment -
I have made a game in Flash MX, and it is a time based game, the object being to complete obstacles in the shortest amount of time - Does anyone know how I can create a separate web page that can be accessed through a "register" button on the Flash game, and have your hi-score posted on that page, including a screen name, from best at top to worst at the bottom?
Source code, websites or any other resources is greatly greatly appreciated!

thanks
FP

Flash Game Score - HELP :)
Hi,
I'm utterly new to Flash and have been given the task of designing a game using the tool. I'm going ok so far but am stuck right now as i'm having trouble figuring out how best to implement a score system.

Basically im typing in the hope that someone may be able to help me out. I know there's a small example in the Flashkit tutorials but its not too great for my use as it makes use of a button press whereas i need to have the score updated with different amount of points depending on which object is hit (with a bullet).

basically what happens is:

1)a gun is fired> 2) a bullet is shot out> 3)the bullet hits an object on screen> 4) this results in the object disapearing and the score going up by a certain amount.

I know this may be a lot to ask but I am hopeful

Thanks for taking the time to read

cheers

-Kane

Flash Game Score Question
hi,

can anyone help me to get this working please.

i have a flash game, where there is a score.
for one one type of hit test i have the score increasing by 1.
for a different hit test i want the score to be reduced by 1.

i have it basically working EXCEPT.....the score will not seem to go below zero....eg (-5) ! i want the score to be able to be negative.

for the increase score hit test i have _root.score+=1;

for the decrease score hit test i have _root.score-=1;


at the begining of the game i have code on the main timeline score=0;

how do i get the score to be able to go below zero?

thanks in advance.

I Need A Flash Score Rembering Game For My Site
Hi, i am looking for a game to add to my site. It has to rember scores so you can see who is at top E.G Fred.

If you have any games like that please forward them,cheers


Mark

Goto A New Scene After Certain Score In Flash Game
i have a third person game and after a score of 15, i would like it to go to a new frame. Does anyone know how to do this?

using Flash MX version 6.0
thx

How Can I Record A Name A Score In A Flash Game And Write Down In A Soreboard?
Hi. I wrote down the summary of my project so that you can understand and answer me more easily:

I have to build an application (a little flash game) in which I record the number of clicks. I want the player to choose a nick at the beginning and when he finishes one or all the four choices of target, i want the application to write his nick and final score in a database for displaying in a scoreboard (hall of fame). All the new entries should be sorted according to the score. If the same nick appears again, it's final score will be modified in the scoreboard only if is higher then the previous.

I was thinking of creating a variable for the name that is chosen at the beginning and a variable for the score that is recorded. When the player finishes the game i want the application to write his data in the database, and then to display the scoreboard (let's say top 10 players in the database from the highest to the lowest score).

I never did this before so i am asking what database shoud i use? I need a programmer to create one for me? Or can flash generate the database?

Is the variable the good way or should I aproach the problem by other means? And if a programmer creates a database in MySql is that good or he should convert it to XML, or Flash generates the XML?

Thank you.


Mark this message as the answer.

Flash Game With PHP/MySQL - Score Faking Problem
I'd like to have a score table for a Flash game and keep it in a database (using loadVars method).

The problem is: how to prevent the score faking?

In normal situation, when the game is over - the score table is called from within Flash and a new score is written in it.

But, there are people who will want to make e.g. one million points without playing a game! :-) They will decompile a .swf, see what loadVars does, and write a score from their custom .php form.

How to prevent it?
Normal authentication isn't suitable here, because the game is open to everybody.

Making A Game In Flash...switching Levels When Certain Score Is Reached
k....I'm attempting to make a game in flash, but I'm stuck on how to make the scene change when the score reaches 1000....please help me. .fla attached. Thank Ypu.

Making A Game In Flash...switching Levels When Certain Score Is Reached
k....I'm attempting to make a game in flash, but I'm stuck on how to make the scene change when the score reaches 1000....please help me. .fla attached. Thank Ypu.

The Score In A Game
Situation - i have a flash game that ends with your score in the final frame in a small box in the corner of the screen

What i'd like - For a larger display of your final score to show up.

Problem is - I'm just not sure how to get this larger dynamic text box to read the final score and just present this score it in a larger size.

Thanks!!!!!!!! :-)

Game Score
I have made a game where i get 10 points everytime i hit a enemy.

Im sure my question i quite easy, if statement wont work

I want the game to end when i get a certain amount of points.

if (points == 20) {
gotoAndPlay (6);
}

but it dont work..

Can anyone plz help, if i manage this my game is complete


Thanks

Synthieboy !

Game Score
in really struggling with a simple game score. i want it to be able to input players name and the present the result on a score boared. Updated as scores increase.

does anyone know a good flash game site or source code i could look at to help me out.

cheers.

Trying To Do A Score For A Game And...
I am a C++ programmer and am new to actionscript 2.0. I am trying to make an asteroids game that gives you a new life after every 1000 points. How would you do this in actionscript?? Thanks!!

Game Over When Score=...
Hi,
I took this code from an open source pong game, but it lacks a 'game over' scene when player(spieler) or opponent (gegener) reaches a certain amount of points. And that is exactly what I would like to add. I would think I could add something like:



Quote:




function spielerwins ()
{
if(spieler_score >= 15)
gotoAndPlay(2);
}




where frame 2 on the main timeline is a movieclip saying something like: game over, you won.

This is the code from the open source, placed on frame 1 of the main timeline:



Quote:




stop();
var spieler_score = 0;
var gegner_score = 0;

loseSnd = new Sound();
loseSnd.attachSound("lose");

bounceSnd = new Sound();
bounceSnd.attachSound("bounce");

// Schwierigkeitsgrad (je grösser der Wert desto Leichter)
skill = 4;

// Spieler (Init)
spielerInitObj = new Object();
spielerInitObj._x = 385;
spielerInitObj._y = 150;
spielerInitObj.onEnterFrame = steuer_spieler;

// Computergegner (Init)
gegnerInitObj = new Object();
gegnerInitObj._x = 15;
gegnerInitObj._y = 150;
gegnerInitObj.onEnterFrame = steuer_gegner;

// Spielball (Init)
ballInitObj = new Object();
ballInitObj._x = 200;
ballInitObj._y = 150;
ballInitObj.vx = 5;
ballInitObj.vy = 0;
ballInitObj.onEnterFrame = steuer_ball;

// Spieler, Gegner und Ball auf die Bühne setzen
_root.attachMovie("rect","spieler",0,spielerInitOb j);
_root.attachMovie("edwin2","gegner",1,gegnerInitOb j);
_root.attachMovie("ball","ball_mc",2,ballInitObj);

// Spielersteuerung
function steuer_spieler() {
if(_root._ymouse > this._height/2 && _root._ymouse < 300 - this._height/2) this._y = _root._ymouse;
}

// Computergegnersteuerung
function steuer_gegner() {
this.dy = this._y - ball_mc._y;
this._y -= this.dy / skill;
}

// Ballsteuerung
function steuer_ball() {
// Mittelpunkt des Spielballs
if(this._y > 300 - this._height / 2) this.vy *= -1;
if(this._y < 0 + this._height / 2) this.vy *= -1;

// Spieler (verliert den Ball)
if(this._x > 400) {
loseSnd.start();
gegner_score += 1;
this._x = 200;
this._y = 150;
this.vx = -5;
this.vy = 0;
}

// Computergegner (verliert den Ball)
if(this._x < 0) {
loseSnd.start();
spieler_score += 1;
this._x = 200;
this._y = 150;
this.vx = 5;
this.vy = 0;
}

// Spieler (Hoch/Runter)
spieler_up_y = spieler._y - spieler._height / 2;
spieler_bottom_y = spieler._y + spieler._height / 2;

// Computergegner (Hoch/Runter)
gegner_up_y = gegner._y - gegner._height / 2;
gegner_bottom_y = gegner._y + gegner._height / 2;

// Spieler (Bewegungraum festlegen)
// Ball-Bewegungsrichtung umkehren
if(this._x > (385 - spieler._width / 2) && this._y > spieler_up_y && this._y < spieler_bottom_y) {
bounceSnd.start();
this.vx *= -1;
this.vy = (this._y - spieler._y) * .8;
}

// Computergegner (Bewegungsraum festlegen)
// Ball-Bewegungsrichtung umkehren
if(this._x < (15 + gegner._width / 2) && this._y > gegner_up_y && this._y < gegner_bottom_y) {
bounceSnd.start();
this.vx *= -1;
this.vy = (this._y - gegner._y) * .8;
}

// Ballbewegung (Umsetzen)
this._x += this.vx;
this._y += this.vy;

// Ballgeschwindigkeit um den Faktor 1.0001 erhöhen
this.vx *= 1.0010;
this.vy *= 1.0001;
}




Could someone tell me how I should do this?I am sorry it is in german, but that's the source!

Thank you very much again,
Jerryj.

Game Over When Score=...
Hi,
I took this code from an open source pong game, but it lacks a 'game over' scene when player(spieler) or opponent (gegener) reaches a certain amount of points. And that is exactly what I would like to add. I would think I could add something like:



Quote:




function spielerwins ()
{
if(spieler_score >= 15)
gotoAndPlay(2);
}




where frame 2 on the main timeline is a movieclip saying something like: game over, you won.

This is the code from the open source, placed on frame 1 of the main timeline:



Quote:




stop();
var spieler_score = 0;
var gegner_score = 0;

loseSnd = new Sound();
loseSnd.attachSound("lose");

bounceSnd = new Sound();
bounceSnd.attachSound("bounce");

// Schwierigkeitsgrad (je grösser der Wert desto Leichter)
skill = 4;

// Spieler (Init)
spielerInitObj = new Object();
spielerInitObj._x = 385;
spielerInitObj._y = 150;
spielerInitObj.onEnterFrame = steuer_spieler;

// Computergegner (Init)
gegnerInitObj = new Object();
gegnerInitObj._x = 15;
gegnerInitObj._y = 150;
gegnerInitObj.onEnterFrame = steuer_gegner;

// Spielball (Init)
ballInitObj = new Object();
ballInitObj._x = 200;
ballInitObj._y = 150;
ballInitObj.vx = 5;
ballInitObj.vy = 0;
ballInitObj.onEnterFrame = steuer_ball;

// Spieler, Gegner und Ball auf die Bühne setzen
_root.attachMovie("rect","spieler",0,spielerInitOb j);
_root.attachMovie("edwin2","gegner",1,gegnerInitOb j);
_root.attachMovie("ball","ball_mc",2,ballInitObj);

// Spielersteuerung
function steuer_spieler() {
if(_root._ymouse > this._height/2 && _root._ymouse < 300 - this._height/2) this._y = _root._ymouse;
}

// Computergegnersteuerung
function steuer_gegner() {
this.dy = this._y - ball_mc._y;
this._y -= this.dy / skill;
}

// Ballsteuerung
function steuer_ball() {
// Mittelpunkt des Spielballs
if(this._y > 300 - this._height / 2) this.vy *= -1;
if(this._y < 0 + this._height / 2) this.vy *= -1;

// Spieler (verliert den Ball)
if(this._x > 400) {
loseSnd.start();
gegner_score += 1;
this._x = 200;
this._y = 150;
this.vx = -5;
this.vy = 0;
}

// Computergegner (verliert den Ball)
if(this._x < 0) {
loseSnd.start();
spieler_score += 1;
this._x = 200;
this._y = 150;
this.vx = 5;
this.vy = 0;
}

// Spieler (Hoch/Runter)
spieler_up_y = spieler._y - spieler._height / 2;
spieler_bottom_y = spieler._y + spieler._height / 2;

// Computergegner (Hoch/Runter)
gegner_up_y = gegner._y - gegner._height / 2;
gegner_bottom_y = gegner._y + gegner._height / 2;

// Spieler (Bewegungraum festlegen)
// Ball-Bewegungsrichtung umkehren
if(this._x > (385 - spieler._width / 2) && this._y > spieler_up_y && this._y < spieler_bottom_y) {
bounceSnd.start();
this.vx *= -1;
this.vy = (this._y - spieler._y) * .8;
}

// Computergegner (Bewegungsraum festlegen)
// Ball-Bewegungsrichtung umkehren
if(this._x < (15 + gegner._width / 2) && this._y > gegner_up_y && this._y < gegner_bottom_y) {
bounceSnd.start();
this.vx *= -1;
this.vy = (this._y - gegner._y) * .8;
}

// Ballbewegung (Umsetzen)
this._x += this.vx;
this._y += this.vy;

// Ballgeschwindigkeit um den Faktor 1.0001 erhöhen
this.vx *= 1.0010;
this.vy *= 1.0001;
}




Could someone tell me how I should do this?I am sorry it is in german, but that's the source!

Thank you very much again,
Jerryj.

AS2 - Game Score
Hello:
1)I want the movie to go to "win" frame after the bomb hit score >6, but it does not go to that frame at all.

2)Also, I cannot see the score changing in the Bombs hit text field.


http://www.4shared.com/file/76751175...egame3fla.html

Kindly advise

Game Score?
Last edited by Ziao55 : 2006-11-27 at 18:00.
























Hi again my Dear mentors,
This time I am running to a very serious problem which completely confuse and I don’t have a clue and I seek your help badly.
I have a game with 35 Q and 8 answer buttons which for every Q. there is only one corect and 7 wrong answer buttons. It’s a word game. (A numerical score should be visible (out of 35) for the student to monitor how they are doing. Students should obtain a score of at least 30/35 in order to complete the activity. They should have the choice to try the incorrect answers again if they have 30 (mandatory) or more than 30 (optional)).
What should I do for student after they answer 30 out of 35, to go back to only the wrong answers and correct them?
else, goAndStop(“start”);

Game Score
In my snooker game im making , I want to have a score up for every ball that is potted. I know how to set up the dynamic text boxes but im not sure what code to add to make it work. Can anyone point me in the right direction please? Cheers.

Flash Game That Returns Score To A Text File Or A Xml File
Hai,

I am New to Flash dont even know the abc of flash and i have a task thst is i need to have a game in flash that plays with a user name and after the game is completed the score and the user name are to be return into a text file or a xml file in the system.... can this be possible plz hlp me

Score Keeper For Game
Does anyone have any ideas on how to script a counter for a game? I have a simple Memory game for kids I am working on. Each scene has six cards for them to match. After each game is played out, I wanted to give them a score of some sorts, maybe 10 points per game or something like that. Just looking for a simple script as I am a beginner at this. Any help you can offer would be VERY MUCH appreciated! Thank you in advance.

Score Problem In Game
Can anyone help with this one? I have made a penalty shoot out game but the scoreing at the moment is first to 5 as I cant work out how to do a sudden death scenario.

This code below between lines is in the ball on the timeline of each albion shot. Also at the beginning of each scene is a random frame action taking the player to one of 5 possible 'kicks', 4 goals and 1 save. (Similar code and scenes are used for Wolves).
As the ball hits the net, either 'wolvesscore' or 'score', two dynamic text boxes, have '1' added to the number already shown in them on score board. (The first scene sets them both to '0'
________________________________

if (ball.hitTest(_root.NET)) {
_root.wolvesscore = _root.wolvesscore+1;
}
if (_root.wolvesscore>4) {
gotoAndPlay ("play again", 1);
}
________________________________

As it stands 'if (_root.wolvesscore>4)' checks to see if the dynamic text box for wolves is greater than 4, and if so takes the user to a play again (or not) scene. However, this means what I have at the moment is a first to five scenario. Where as what I really want, is to be able to play five shots each, and if they are equal i.e. 5-all to play another set of shots till one misses.

Problem is, I am new to actionscript and don't know what to do in real code even though I think I know what to do in pseudo code, which is pass the numbers from the dynamic text boxes into a variable, compare then at 5 shots apiece then either play another shot each till one misses or go to play again scene. The other thought I had was to compare dynamic text boxes directly ie

if (_root.wolvesscore eq 5) && (_root.score eq 5);
gotoAndPlay ("play one more", 1);
else gotoAndPlay ("play again", 1);
}

but this didn't work.

Dave
game is at
http://www.westmidlands.com/footie

How To Make Score In Game
I've so far been having fun making small not-mattering games, but it would be a bit more fun if I could get the score working... So far, i've been fooling around with getProperty, wich I've seen been used in another game, But I just can't seem to get it to work... Does anyone have any ideas of an easy way to make scores and countdown timers that execute an action when countdown is finished?

Please lend us a hand...

-Garbus

ps. This is the game.... It would be more fun with a score counter that works...

http://www.garbus.subnet.dk/andespil/

Help W/ Increasing Score In A Game
Hello, me and some fellow classmates are currently making a target shooter Flash game. The problem is we are having a trouble with the scoring. When you hit the objects the points don't increase and instead "1.#QNA" is displayed where the score should be. We have a dynamic text box that references a variable named "score" to handle the scoring. Below is the Action Script that is on the targets and on the 1st frame of the game. Also included is a link to the .fla file if anyone cares to look at it. The .fla file is originally a Flash 4 file and we are currently using Flash MX 2004 on Windows 2000 If anyone could help us out, it would be greatly appreciated! Thanks.

Action Script on the targets:

on (press) {

gotoAndPlay("../../crosshair");
gotoAndPlay("dead");
gotoAndPlay("../../gun")
Set("/:score", ":/score" + 1);
}



Action Script from the first frame of the game:

score = 0;
starttime = getTimer();
startDrag ("crosshair", true);


http://petunia419.brinkster.net/rebuild46.fla

Game Score Keeper
hi thanks for reading this
www.whackyourboss.com
I have dyslexia (i'm not kidding) and I need help.
This game is getting 20k downloads a day.
I want to make a simple score keeper and I need help. I work best when i'm shown. I can link to you for a month if you can talk me through what to do.
We could help eachother. tomwink@earthlink.net
Thanks for your consideration.
Tom

Flash8 Game Score Help
I made a simple flash game in flash8.I want if the score reaches a certain point to goto a different screen to display a message or for a message to appear.I thought to put in this code
if(score>=500)
{_root.gotoAndStop(10);
}
after this line. _root.score+=100;
but when I do it goes to frame 10 on the first shot instead of 500.
here is the code for the laser. Am I putting the score code in the wrong place?Any help appreciated.


onClipEvent (load) {
laserMoveSpeed=20;
this._y=_root.spaceship._y+45;
this._x=_root.spaceship._x+100;
}
onClipEvent (enterFrame) {
if (this._name<>"laser"){

this._x+=laserMoveSpeed;
if (this._x>600){
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
for (i=1; i<=_root.numEnemy; i++){
if (this.hitTest( _root["enemy"+i])){
_root.score+=100;
_root["enemy"+i].gotoAndPlay( 2 );
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
}}
}

Score/lives(for A Game)
hey i just wanted to know how to creat a score. for example, i'm creating a brakeout game. and every time the ball hits a brick i want the brick to give you a point like 20 points per brick. can eny one please help me? thanx.

oh, and by the way can any one tell me how to take lives? for example. if my ball doesnt hit my paddle and hits the ground, can you show me or tell me how i cant take lifes away. maybe 1 life down and you have 2 left? hehehe im asking a lot i know well thanx for who ever helps me out

Reset Score For A Game
Hello everyone,

I have used the script for adding score to a game from the advanced tutorials section and it works fine. The only problems I still have with it are:

1- it discounts 100 points every time the users click on the same wrong button. I would like the button to work only once since this is for an educational game.

2- when I go back to the first frame, the latest score is already there. How can I erase the score or set it to "0" when the scene is reloaded?

Appreciate your help.

Sawy

Showing The Score In A Game
I have this matching game and I want to show the players score on the next frame called "score1" in the movie. I've hit a dead end on this and any help would be great


Code:
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.getTimer;

public class matching3 extends MovieClip {
// game constants
public static const boardWidth:uint = 6;
public static const boardHeight:uint = 6;
private static const cardHorizontalSpacing:Number = 52;
private static const cardVerticalSpacing:Number = 52;
private static const boardOffsetX:Number = 120;
private static const boardOffsetY:Number = 45;
private static const pointsForMatch:int = 100;
private static const pointsForMiss:int = -5;

private var firstCard:Card;
private var secondCard:Card;
private var cardsLeft:uint;
private var gameScore:int;
private var gameStartTime:uint;
private var gameTime:uint;

private var gameScoreField:TextField;
private var gameTimeField:TextField;

public function machting3():void {
// make a list of card numbers
var cardlist:Array = new Array();
for(var i:uint=0;i<boardWidth*boardHeight/2;i++) {
cardlist.push(i);
cardlist.push(i);
}

// create all the cards, position them, and assign a randomcard face to each
cardsLeft = 0;
for(var x:uint=0;x<boardWidth;x++) { // horizontal
for(var y:uint=0;y<boardHeight;y++) { // vertical
var c:Card = new Card(); // copy the movie clip
c.stop(); // stop on first frame
c.x = x*cardHorizontalSpacing+boardOffsetX; // set position
c.y = y*cardVerticalSpacing+boardOffsetY;
var r:uint = Math.floor(Math.random()*cardlist.length); // get a random face
c.cardface = cardlist[r]; // assign face to card
cardlist.splice(r,1); // remove face from list
c.addEventListener(MouseEvent.CLICK,clickCard); // have it listen for clicks
addChild(c); // show the card
cardsLeft++;
}
}

gameScoreField = new TextField();
addChild(gameScoreField);
gameScore = 0;
showGameScore();

gameTimeField = new TextField();
gameTimeField.x = 450;
addChild(gameTimeField);
gameStartTime = getTimer();
gameTime = 0;
addEventListener(Event.ENTER_FRAME,showTime);
}

// player clicked on a card
public function clickCard(event:MouseEvent) {
var thisCard:Card = (event.target as Card); // what card?

if (firstCard == null) { // first card in a pair
firstCard = thisCard; // note it
firstCard.gotoAndStop(thisCard.cardface+2); // turn it over

} else if (firstCard == thisCard) { // clicked first card again
firstCard.gotoAndStop(1); // turn back over
firstCard = null;

} else if (secondCard == null) { // second card in a pair
secondCard = thisCard; // note it
secondCard.gotoAndStop(thisCard.cardface+2); // turn it over

// compare two cards
if (firstCard.cardface == secondCard.cardface) {
// remove a match
removeChild(firstCard);
removeChild(secondCard);
// reset selection
firstCard = null;
secondCard = null;
// add points
gameScore += pointsForMatch;
showGameScore();
// check for game over
cardsLeft -= 2; // 2 less cards
if (cardsLeft == 0) {
MovieClip(root).gameScore = gameScore;
MovieClip(root).gameTime = clockTime(gameTime);
MovieClip(root).gotoAndStop("score1");
}
} else {
gameScore += pointsForMiss;
showGameScore();
}

} else { // starting to pick another pair
// reset previous pair
firstCard.gotoAndStop(1);
secondCard.gotoAndStop(1);
secondCard = null;
// select first card in next pair
firstCard = thisCard;
firstCard.gotoAndStop(thisCard.cardface+2);
}
}

public function showGameScore() {
gameScoreField.text = "Score: "+String(gameScore);
}

public function showTime(event:Event) {
gameTime = getTimer()-gameStartTime;
gameTimeField.text = "Time: "+clockTime(gameTime);
}

public function clockTime(ms:int) {
var seconds:int = Math.floor(ms/1000);

var minutes:int = Math.floor(seconds/60);
seconds -= minutes*60;
var timeString:String = minutes+":"+String(seconds+100).substr(1,2);
return timeString;
}
}
}

Score/lives(for A Game)
hey i just wanted to know how to creat a score. for example, i'm creating a brakeout game. and every time the ball hits a brick i want the brick to give you a point like 20 points per brick. can eny one please help me? thanx.

oh, and by the way can any one tell me how to take lives? for example. if my ball doesnt hit my paddle and hits the ground, can you show me or tell me how i cant take lifes away. maybe 1 life down and you have 2 left? hehehe im asking a lot i know well thanx for who ever helps me out

High Score For A Game?
Hey guys, i finished the game i was making (see at www.se-miserious.com ) but I want to add a top score system to it...i read a tutorial on flashkit which uses a simple PHP script...that's really easy, but I'm confused as to how to submit the details to write to it...here's the flashkit tutorial:

http://www.flashkit.com/tutorials/Ga...-657/index.php

Please post back with help

How Can Create A Score For A Game
Hello all.

I'm making a trivia game for a customer, and I need to create a score for 2 teams like the game who wants to be millionary... please does anybody knows how can I do that?

Thanks you.

Whack Your Boss Game Needs Score
Hi,
whackyourboss.com is doing 20k downloads a day and I'd be willing to link to your content for a week if you'd be willing to talk to me on the phone and walk me through setting up variables to help the player keep score. I have the flash bible but i work best when someone talks me through the process.
I am in LA , so if it's a long distance call i'd be happy to make the call on my dime.
you can e-mail me at tomwink@earthlink.net
Thanks you!
Tom Winklerhttp://www.whackyourboss.com

[CS3] Score Counter In A Shooter Game
I figured that this question would be too basic for the AS3 section, so here it goes.

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

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

The file is attached so you see what I'm talking about. Any additional help would be greatly appreciated.

Thanks.

Submit Score For Offline Game
Hi all

have a web game developed in AS 3 where the user submits the score at the end. This is done by sending the score to a php script which sends off an email - no problems there.

The client now wants an offline version of the game (to run on CDROM) and still wants the users to be able to submit their score. I'm stumped as to how I can do this. Initial testing using the online php script with the offline game triggered the security error that we all know and love. Having the user set their prefs, relaunch the app and play the game all over again is not a viable solution in this case. Is there any way around this security issue? What if I promise Flash that I won't do anything nasty to the users computer?

Another idea was to encrypt the text (that would have been sent in the email), display the encrypted text to the user and tell them to copy and paste it into an email. This idea could work but is there a cross-platform, offline way to apply 2 way encryption to text? It needs to be 2 way as I would make a little app for the client to convert the encrypted text back to human readable text.

Any thoughts?

thanks in advance

Platform Game : Score Question
Hey guys,

Im currently creating a plaform game which keeps score and the number of lives the player has.

When the game starts you have 3 lives.

The following code displays the information. I havent included everything as its very long...

Code:

public function addScore(numPoints:int) {
         gameScore += numPoints;
         scoreDisplay.text = String(gameScore);
         
      
      }
      
      // update player lives
      public function showLives() {
         livesDisplay.text = String(playerLives);
         
      
      }

Ok. What i want to do is add 1 to the number of lives if say the user gets 10 points.

I tried including

Code:

if (gameScore == 10) {
         playerLives++
      }

But it doesnt seem to work.

Hope someone can help me.

Cheers.

SCORE KEEPER - GAME - 1 LINE OF CODE
I got a advanced_score file off flashkit and everything works fine from the server to the programming except I’m having one little problem. I can’t get the final score to be put into the score keeper box it just stays at zero:

- I’m using flash 6

- the path was: Set Variable: "_level0/score:my_score" = scorevariable

- I tried that it didn’t work, so I was using: scorevariable = "_level0/score:my_score"; but it still didn't work.

- all the instances are set and the path is put in the first frame of actions in the score keeping clip

I’ve been trying for a good 3 hours of guessing how else it would work and I either get errors or just nothing changes.

Please help I used all efforts to fix this problem on this game.

The link to the game is at: http://www.sarahspetpals.com
and the link I got the score keeper at is here on flashkit at: http://www.flashkit.com/movies/Games...1904/index.php

Thanks for everyones help!

-Josh
HALO DEZIGNS

AS Intermediate Needs Master For HitTest + Score Game
I have activity levels within an MX game which are using "hitTest" to score at activity level, which when a certain score is achieved, will add +1 to the overall game score.

Problems are: 1) working multiple drag MC's using "hitTest" on the same stage doesn't seem to work - it will only let me choose the first drag MC

2) Once the "stopDrag" is invoked I then need the player to go and click a check answers button to add the "true" statements returned from the target areas. But the moment the mouse rolls away from the target area, the status becomes "false" again.

Appreciate anyone taking a look at the fla and making suggestions as to how this might be achieved easier or more efficiently

http://www.sprint.net.au/~dman/hitTest-test.fla

dman

Game Tutorial: Adding An If Score>5000?
note: i have flash mx 2004

Hey guys,
I followed your tutorial at here but am having problems, lol. I modified the game so that you whack the enemies with a sludge hammer instead of a laser and stuff (took me awhile to change it lol) but i'm stuck now....I know it seems so basic but i'm a newbie .

I'm trying to make it so that when the score hits a certian limit (ie: 5000) then for it to go to another scene (lets just say frame 5)

i got:

if (score>5000){
gotoAndPlay (5);
}

i put it in the control layer after the "score=0;" part. I tried so many derivitives with "no errors" lol, but it still doesn't work.

It can be found
here if any of you are interested. It's for a school project btw lol.

If anyone can tell me why it doesn't work i'll be grateful.

Thanks,
David.

How Do I Modify This Game Code To Check Score?
We are new to actionscripting and purchased some flash games to modify for our website. Below is the original actionscript code to check if the users lives are spent and direct them to the gameover scene:

code:
SpaceInvaders.prototype.check_game_over = function( )
{
// check if the player has run out of lives
if (this.player_lives <=0)
{
_root.gotoAndStop("Game Over");
}
}


We want to modify the code above to also check this.score as well and if it is >=500 direct to the scene Game Over1 or if it is <=500 direct them to the Game Over0 scene instead which takes the user to a URL advising them of how many points they have earned.

We tried an AND statement but it didn't work, it directed the user as soon as they lost 1 life instead of when they had 0 lives left.

Can anyone help us? thanks.

We are using Flash 8 Professional version

[CS3] Define Rank By High Score In A Game?
Hi, im building an quizgame and it gives different scores by different answers. And at the end i would like it to say one of 3 different "ranks" according to the gained score.

I cant seem to get a basic code for this to work, here in pseudo:


Code:
if score = <0 then trace "that was bad" else trace "you did great"
any tips? thanks!

How To Keep & Display Score For Drag & Drop Game?
I need your kind help urgently.

I need to create a simple drag and drop game. If the object is dropped to the correct location, the score will be displayed (e.g. 3 out of 4 right!).

I managed to create the drag and drop and snapped it at the right location.

But, am unable to keep and display the score.

I have minimal AS knowledge so the code below was taken from other sites. (I do know the meaning of instance names, and some basic actions though)

Anyone can help?????
-------------------------------------------------------------------------
This is my actionscript applied for the object called "paper" -

onClipEvent (load) {
origX = this._x;
origY = this._y;
}

onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
}
// see if the dropZone contains the center of this mc
if (_parent.plastic.hitTest(this._x,this._y,true)) {

// center it on the drop zone
this._x = _parent.plastic._x;
this._y = _parent.plastic._y;

// this part here, I did on my own...just an assumption that it might
work but didn't
var total=1;
total++;
score.text="You scored " + total +" out of 4";
}
else {
// return it to its original location
this._x = origX;
this._y = origY;
}

}

Help Ending Game When A Sertain Score Is Reached
I'm making a tilebased flashgame and I need it to change to the next scene when the score has reached 46. But I just can't make it happen!
I'm total neewbie at flash and actionscript and I must say that most of my scripts are taken from a guide.
The whole game works but I can't figure out what I do wrong when I try to make it end.

The game is counting scores and if you die you'll get to the right screen.

Would somebody please be so kind to help me!
I need the game finished before tueseday, so please reply quickly!

Help How To Keep & Display Score For Drag & Drop Game?
I need your kind help urgently.

I need to create a simple drag and drop game. If the object is dropped to the correct location, the score will be displayed (e.g. 3 out of 4 right!).

I managed to create the drag and drop and snapped it at the right location.

But, am unable to keep and display the score.

I have minimal AS knowledge so the code below was taken from other sites. (I do know the meaning of instance names, and some basic actions though)

Anyone can help?????
-------------------------------------------------------------------------
This is my actionscript applied for the object called "paper" -

onClipEvent (load) {
origX = this._x;
origY = this._y;
}

onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
}
// see if the dropZone contains the center of this mc
if (_parent.plastic.hitTest(this._x,this._y,true)) {

// center it on the drop zone
this._x = _parent.plastic._x;
this._y = _parent.plastic._y;

// this part here, I did on my own...just an assumption that it might
work but didn't
var total=1;
total++;
score.text="You scored " + total +" out of 4";
}
else {
// return it to its original location
this._x = origX;
this._y = origY;
}

}

Changing The Level Of A Game From A Dynamic Text Box That Contains The Score
I am trying to modify the mosquito_killer.fla that comes in the samples directory of Flash 5.

What I want to do is go to a new scene when the user hits a certain number of targets.

My guess is that the onClicpEvent(enterFrame) code of the mosquito object is what needs to be changed. Ive added my own if statement and it seems to recognise the if root.score < 5) but doesnt do the else (see below)

onClipEvent (enterFrame) {
if (_root.score<5) {

// animate mosquito
_parent._x = _parent._x+xstep;
_parent._y = _parent._y+(Math.sin(_parent._x/100)*ystep);
if (_parent._x<-30 and xstep<0) {
// make the game easier and turn the direction
xstep = -(xstep-(xstep/16));
ystep = -(ystep-(ystep/16));
scale = _parent._yscale+4;
_parent._xscale = scale;
_parent._yscale = scale;
} else if (_parent._x>670 and xstep>0) {
// make the game easier and turn the direction
xstep = -(xstep-(xstep/16));
ystep = -(ystep-(ystep/16));
scale = _parent._yscale+4;
_parent._xscale = -scale;
_parent._yscale = scale;
}

// stereo buzz sound
if (_parent._x<0) {
x = 0;
} else if (_parent._x>640) {
x = 640;
} else {
x = _parent._x;
}

soundobject.setPan((x-(640/2))*100/(640/2));

} else {

gotoAndPlay ("intro", 1);

}
// end if
}
// end function

can someone help me?

Cheers
Skek

Updating Game Score: Getting Type Error 1009
Hi all,

I have a simple puzzle game which has a score keeping mechanism. When you choose to view a "clue", your score is meant to be lowered. My game is set up with the main .fla file and an external actionscript 3.0 file.

Problem is, when I try to call the function to display the new score after changing it, I get this error:
"TypeError: Error #1009: Cannot access a property or method of a null object reference."

It doesn't have a problem actually adding to the score variable, because my trace came out just fine.

I have no idea why it is doing this... Below is the code of the 2 files. Hopefully someone will be able to help!

NOTE: The part of the code my .fla file is calling is toward the very bottom of the .AS file. I just included the beginning so people could see how I had the variables for the scoring defined.
------------------
File 1: .FLA File'
(segment from inside of a movie clip called "azrie")













Attach Code

myLead.addEventListener(MouseEvent.CLICK, displayLead);

function displayLead(event:MouseEvent) {
var puzzle:MovieClip = new puzzleShow();
puzzle.x = 320;
puzzle.y = -375;
addChild(puzzle);
puzzle.addEventListener(Event.ADDED, onAdded);

}

function onAdded(event:Event) {
var UpdateScore = new SlidingPuzzle();
UpdateScore.updatelead();
}

------------
File 2: external .AS file;
(part of it that is relevant)

public class SlidingPuzzle extends MovieClip {
static const pieceSpace:Number = 2;
static const horizOffset:Number = 50;
static const vertOffset:Number = 50;

static const numPiecesHoriz:int = 4;
static const numPiecesVert:int = 3;

//scoring constants
static const pointsForSolveFast:int = 250;
static const pointsForSolveAvg:int = 100;
static const pointsForSolveSlow:int = 75;
static const pointsForLead:int = -25;
static const pointsForSkip:int = -100;

//sound
var sound2:Sound = new beep();


//randomizer
static const numShuffle:int = 200;
static const slideSteps:int = 10;
static const slideTime:int = 250;

//size of pieces
private var pieceWidth:Number;
private var pieceHeight:Number;

//puzzle piece array
private var puzzleObjects:Array;

//move tracking
private var blankPoint:Point;
private var slidingPiece:Object;
private var slideDirection:Point;
private var slideAnimation:Timer;

//game timer
private var gameStartTime:uint;
private var gameTime:uint;
private var gameTimeField:TextField;

//score
public var gameScoreField:TextField;
public var gameScore:int;

public function startSlidingPuzzle() {
startAzrie();


blankPoint = new Point(numPiecesHoriz-1, numPiecesVert-1);
loadBitmap("playground_copy.jpg");



var scoreFormat:TextFormat = new TextFormat();
scoreFormat.font = "Arial Black";
scoreFormat.size = 24;
scoreFormat.bold = true;

//display score
gameScoreField = new TextField();
gameScoreField.selectable = false;
gameScoreField.defaultTextFormat = scoreFormat;
gameScoreField.x = 335;
gameScoreField.y = 534;
gameScore = 10;
addChild(gameScoreField);

gameScoreField.text = ""+String(gameScore);


var timerFormat:TextFormat = new TextFormat();
timerFormat.font = "Arial Black";
timerFormat.size = 24;
timerFormat.bold = true;

//display clock
gameTimeField = new TextField();
gameTimeField.selectable = false;
gameTimeField.defaultTextFormat = timerFormat;
gameTimeField.x = 525;
gameTimeField.y = 495;
addChild(gameTimeField);

gameStartTime = getTimer();
gameTime = 0;
addEventListener(Event.ENTER_FRAME, showTime);



}

//---- end constructor function



//disables call btn
public function disableCall(callbtn) {
callbtn.enabled = false;
}

public function updatelead() {
gameScore += pointsForLead;
trace(gameScore);
showGameScore();
}

public function showGameScore() {
gameScoreField.text = ""+String(gameScore);
}

























Edited: 04/25/2008 at 05:41:54 PM by KitsuneRinzei

The Score Board InFlash MX Game Design Demystified
Ive got the book Flash MX Game Design Demystified and ive used the example in the book for submitting score to a database with asp. Now ive got it working fine apart from one little bug!

When i submit a score of 9.11 the scroboard displays 9, or if i submit a score of 12.55 it will show as 12.

I emailed the books author Jobe Makar with the problem and he replied saying 'the database is set to only accept an integer ' so i got a programmer to alter the database, and sure enough it was made to only accept single values and we changed it to accept double values. BUT it still dosnt work??

Im not a asp man so im guessing that somewhere in the asp the value of 9.11 is being changed to 9 and so on.

Has any one come accros this problem?? a long shot i know!!

Cheers

Flash Mouse Tracker
Hi all,

Thanks for your interest in my post.

I was just wandering if anybody can give me a detailed tutorial on Flash 5 mouse trackers please.

Here is the link to the specific mouse tracker that I want to do (it's in HTML, but as I say, I want to do it in Flash!):

http://www.alanvandermerwe.com/indexmain.htm

It's at the top of the main frames.

I don't mean to be fussy, but if anybody writes a tutorial for me, can they please write it in step-by-step instructions please as I'm only a beginner to Flash.

Thank you very much everybody.

Take care,

Mark

Site Tracker For Flash?
Can you put a site tracker with flash? If you can I get a few links to some? Thanks

Flash Link Tracker
Hi everyone,
Is there any software or code out there that I can implement on a Flash website to track each link a visitor clicks on. So far I have only found software that tracks the exit page and not the actual link that was clicked. Since there is only one page with 35 links, I need to track the 35 links, not the exit page. Does anyone know of software that can do this?

Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved