Be a Supporter!

As2 Help

  • 267 Views
  • 7 Replies
New Topic Respond to this Topic
SteakandKidneyPie
SteakandKidneyPie
  • Member since: Sep. 28, 2009
  • Offline.
Forum Stats
Member
Level 23
Blank Slate
As2 Help 2010-03-03 19:29:09 Reply

I have made the timer, now I need to set a score. I want to be able to make it that every second goes by, you will lose one point.

Can someone help or give me a tutorial. Thanks


Do you need $10 000 in cash for a 30 second animation? Click here

zlix12
zlix12
  • Member since: Jul. 28, 2009
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to As2 Help 2010-03-03 19:39:15 Reply

var score:Number = 10;
var i:Number = 0;
onEnterFrame = function(){
      i++;
      if(i >= 30){
            score -= 1;
            i = 0;
     }
}
grafik2d
grafik2d
  • Member since: Jun. 29, 2004
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to As2 Help 2010-03-03 21:04:15 Reply

I think you are looking at it the wrong way, building a game is about applying what you have learned about AS. Go read this and spend some time on As:main. You can't just ask people to point you a tutorial or write you code for every feature you want to put in you game.

ProfessorFlash
ProfessorFlash
  • Member since: Oct. 6, 2007
  • Offline.
Forum Stats
Member
Level 32
Programmer
Response to As2 Help 2010-03-03 21:26:58 Reply

I suspected in his previous thread that his next question will be "how do I make a racing game", but apparently his plan is to ask it one feature a time, lol :).


You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.

SteakandKidneyPie
SteakandKidneyPie
  • Member since: Sep. 28, 2009
  • Offline.
Forum Stats
Member
Level 23
Blank Slate
Response to As2 Help 2010-03-03 22:40:07 Reply

At 3/3/10 09:26 PM, ProfessorFlash wrote: I suspected in his previous thread that his next question will be "how do I make a racing game", but apparently his plan is to ask it one feature a time, lol :).

Yeh, but I have only asked 2 questions because I am kinda new at making flash games.

But I have finished it. All I need now is a leaderboard, then submission.


Do you need $10 000 in cash for a 30 second animation? Click here

CompleteDouche
CompleteDouche
  • Member since: Dec. 1, 2008
  • Offline.
Forum Stats
Member
Level 09
Musician
Response to As2 Help 2010-03-03 22:57:52 Reply

Whatever your game is, I think a racing game? Make sure any collision is refined to perfection, having the game being enjoyable, and long.

You should have a friend review your game before you submit it.


No matter what your weaknesses are, make sure your own abilities supersede them.

Treerung
Treerung
  • Member since: Apr. 18, 2008
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to As2 Help 2010-03-04 12:07:44 Reply

Except his "racing" game is just clicking a button..200 times..


:'(

BBS Signature
SteakandKidneyPie
SteakandKidneyPie
  • Member since: Sep. 28, 2009
  • Offline.
Forum Stats
Member
Level 23
Blank Slate
Response to As2 Help 2010-03-05 07:19:27 Reply

At 3/4/10 12:07 PM, Treerung wrote: Except his "racing" game is just clicking a button..200 times..

Exactly, just getting to learn flash


Do you need $10 000 in cash for a 30 second animation? Click here