Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

how to make a score game with timer on flash

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,656
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 27, 2009

ok so do a new frame call the 1 with the counter timer and then put this in frame with timer on this is code:
timer = 15;

countdown = function(){ timer--; if(timer==0){ clearInterval(countdownInterval); gotoAndPlay(2);
}
}

countdownInterval = setInterval(countdown,1000);
_root.score=0
then code for char is and put his name as char as a movie clip ans instance name is char so the code is
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this._x -= 15;
this.gotoAndStop("left");
}else if(Key.isDown(Key.RIGHT)){
this._x += 15;
this.gotoAndStop("right");
}else if(Key.isDown(Key.DOWN)){
this._y += 15;
this.gotoAndStop("down");
}else if(Key.isDown(Key.UP)){
this._y -= 15;
this.gotoAndStop("up");
}
}
then code for money is do it as a movie clip:
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score++;
unloadMovie (this);
}
}
then the next the layer with no name put on action:
stop();
then do that for both of the secand frame put on the 2
stop();



thanks for reading

Category:

Film & Animation

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (TheJake1999)

  • um how to make your timer go on the second i put in the codes and they dont seem to make it slower or nothin my numbers go really fast

  • @marioandluigi244 well to be totaly honest i've moved on from as2 to as3 ad i am still learning i am only 11 years old so i dont know evry thing abot it but lets hope i lern thanks for reading

  • no it dint bother ty for info

see all

All Comments (11)

Sign In or Sign Up now to post a comment!
  • @rhuang114 Declare the score as an integer, not a string

  • @SOSODEAF5 you're welcome

  • @alanj2007 thxs

  • @SOSODEAF5

    in the frame actions : write this :

    _root.score = 0

  • help mine says NAN amount!!!

  • hey if ur still there, i want to make a game whre wenever u click on a moving target, it adds 100 score points, i was able to make the score, but whenver it addds a hundred it become 100100100 instead of 100, 200, 300 so ya any tips? also i wanna start from the beginning so ya i deleted my old code help if u can maybe in pm would be easier

  • lol loopvishal is a dumass

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more