Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-29-2003, 07:17 AM   #1
StrugglingHard
Registered User
 
Join Date: Oct 2003
Location: sydney
Posts: 1
Unhappy displaying variables like a total score

I am wondering if anybody can help me to learn how to make a variable increment and also to display the variable like the final score.
What I know of variables so far I think is right but I know absolutely nothing about flash and actionscript so please correct me. This is what I know from JavaScript and from what I have read so far about variables in ActionScript.

Assigning the variable score the value of 12 is:

score = 12;

Right or wrong? please?

Incrementing the variable score is:

score = score + 1;

Right or wrong? please?

What I read in the forums about displaying variables is to use a text field. Is there anything else I need to do to make sure it displays like all the other text in the frame it appears with?
If you have read this thanks, and if you can help me or think there is anything else I need to know or learn I would really appreciate it.

StrugglingHard
StrugglingHard is offline   Reply With Quote
Old 10-29-2003, 09:49 AM   #2
cobo
everyday looser...
 
cobo's Avatar
 
Join Date: Jul 2002
Location: Austria
Posts: 647
Default

hi,

Assigning the variable score the value of 12 is:

score = 12; <-- right

Right or wrong? please?

Incrementing the variable score is:

score = score + 1; <-- right

but itīs easier if u write score += 1;

Right or wrong? please?

What I read in the forums about displaying variables is to use a text field. Is there anything else I need to do to make sure it displays like all the other text in the frame it appears with?
If you have read this thanks, and if you can help me or think there is anything else I need to know or learn I would really appreciate it.


A tut about variables: http://www.actionscript.org/tutorial...es/index.shtml

cobo
__________________
....want some more TNT, birdie... !?! ...
cobo is offline   Reply With Quote
Old 10-29-2003, 11:32 AM   #3
binkyboo
Senior Member
 
binkyboo's Avatar
 
Join Date: Mar 2002
Location: Madison, Wisconsin
Posts: 1,312
Send a message via MSN to binkyboo
Default

ActionScript Code:
score++

This works as well.
binkyboo is offline   Reply With Quote
Old 10-29-2003, 12:28 PM   #4
annexion
I make out with chicks
 
Join Date: Oct 2002
Location: NYC
Posts: 1,586
Default

Or:

++score;

But score++ would be better for a scoring mechanism.
__________________
www.perpetuated.com
annexion is offline   Reply With Quote
Old 04-26-2008, 05:02 PM   #5
game_guru
Registered User
 
Join Date: Apr 2008
Posts: 5
Default

so this helped me out to but on what layer would you put this actionscript
game_guru is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:30 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.