开发者

Display unicode character in Actionscript

开发者 https://www.devze.com 2022-12-22 19:48 出处:网络
I have the following unicode for a char: 0x023D2A开发者_JAVA百科 How do I display it using: textField.text = ???;

I have the following unicode for a char:

0x023D2A   开发者_JAVA百科

How do I display it using:

textField.text = ???;

I have have the name of the character. Can I reference it by name?


Try this:

textField.text = String.fromCharCode(0x023D2A)


textField.text = "Adobe\u00ae" should give you "Adobe®". Replace your Unicode as required. (Note: I don't have Flash with me where I am; I am posting the above untested.)


Tested whybird's syntax: it works. You can use \u plus the unicode value in hex inside the string.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号