Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-17-2012, 12:02 AM   PM User | #1
Triple
New to the CF scene

 
Join Date: Jul 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Triple is an unknown quantity at this point
Actionscript 3: Textfield Variables

Hey there, I have having a little trouble with my project. I have a textfield which I have given the instance name of money. For the coding, I have this:
var money:int = 10;
money.text = "$" + money;
I want the variable money to be 10. For the text output, I want it to show $10. This isn't working though. I keep getting the error:
1151: A con flict exists with definition money in namespace internal.
Source: var money:int = 10;

Can you please help me figure out what it is I did wrong? Any help is appreciated.
Triple is offline   Reply With Quote
Old 07-17-2012, 08:46 AM   PM User | #2
kdta91
New to the CF scene

 
Join Date: Jun 2012
Location: Philippines
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kdta91 is an unknown quantity at this point
If "money.text" is a label, then this should work.

var money:int = 10;
money.text = "$" + money.toString();
kdta91 is offline   Reply With Quote
Reply

Bookmarks

Tags
actionscript-3, coding, flash, textfield, variables

Jump To Top of Thread


Thread Tools
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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:12 PM.


Advertisement
Log in to turn off these ads.