使用它(更安全一点,因为如果myInstanceVariable为null,它仍然可以工作):
String(myInstanceVariable)
Run Code Online (Sandbox Code Playgroud)
要么
myInstanceVariable.toString()
Run Code Online (Sandbox Code Playgroud)
另外,我刚刚发现这篇很好的文章解释了不同的方法:http://www.morearty.com/blog/2008/07/28/actionscripts-different-ways-to-convert-an-object-to-a-string /