Reputation: 21934
Is there a simple way to convert an instance variable to a String?
Upvotes: 0
Views: 1367
Reputation: 32532
Use this (a bit safer because it will still work if myInstanceVariable
is null):
String(myInstanceVariable)
or
myInstanceVariable.toString()
Also, I just found this nice article explaining the different methods: http://www.morearty.com/blog/2008/07/28/actionscripts-different-ways-to-convert-an-object-to-a-string/
Upvotes: 5