Next Question
RSS
yeah I ran into that inconsistency too. I guess trace calls toString() for you if it needs to or something. which is not normally how those things work.
use .toString();
Source(s):
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Object.html
Permalink | Report
Answered Question
M$1
January 03, 2009 01:53 AM
FLASH AS3: How do I convert an object to a string?
I have created a group of radio buttons. Each button has a different '.value'.
I want to copy the selected .value (held in group.selectedData) into another variable. I have:
var myvar:String;
trace (ARadioButton.group.selectedData);
myvar=ARadioButton.group.selectedData;
but I get the error 1118: Implicit coercion of a value with static type Object to a possibly unrelated type String.
The trace outputs the string as expected.
Thanks!
I want to copy the selected .value (held in group.selectedData) into another variable. I have:
var myvar:String;
trace (ARadioButton.group.selectedData);
myvar=ARadioButton.group.selectedData;
but I get the error 1118: Implicit coercion of a value with static type Object to a possibly unrelated type String.
The trace outputs the string as expected.
Thanks!
Interesting Question?
Yes (0)
No (0)
- In Web Development |
- |
- Report |
-
Share
RSS
Best Answer Chosen by Asker
| January 03, 2009 03:26 AM |
use .toString();
Source(s):
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Object.html
| Asker's Rating: |
• Thanks. I think I tried tostring(); and got an error.
Permalink | Report
Answer this Question
Related Questions
No questions found.
Ask a Question
Buy Mahalo Dollars with Credit Card or PayPal
Top Members
Most Popular Tags
Categories
- Anonymous
- Arts & Design
- Beauty & Style
- Books & Authors
- Business
- Cars & Transportation
- Consumer Electronics
- Coupons Deals
- Education
- Entertainment
- Environment
- Fitness
- Food & Drink
- From Email
- From Iphone
- From Twitter
- Health
- History
- Hobbies
- Home & Garden
- How Tos
- Humor
- Jobs
- Legal
- Local
- Love & Relationships
- Mahalo Answers Community
- Money
- Music
- News
- NSFW
- Parenting
- Pets
- Science & Mathematics
- Services
- Shopping
- Social Science
- Society & Culture
- Sports
- Technology & Internet
- Travel
- Video Games
Welcome New Members
- agnesangeles, December 15, 2009 05:26 AM
- victoriasmithca..., December 15, 2009 05:22 AM
- jesswong, December 15, 2009 05:21 AM
- uzmaroohi, December 15, 2009 05:19 AM
- gshester, December 15, 2009 05:13 AM
Mahalo Dollars are the currency of Mahalo Answers.
Each Mahalo Dollar costs $1.
Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More