Jan
Jan

Reputation: 165

Display unicode character in Actionscript

I have the following unicode for a char:

0x023D2A   

How do I display it using:

textField.text = ???;

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

Upvotes: 2

Views: 6875

Answers (3)

Tim Erickson
Tim Erickson

Reputation: 592

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

Upvotes: 1

whybird
whybird

Reputation: 1118

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.)

Upvotes: 3

Lars Blåsjö
Lars Blåsjö

Reputation: 6127

Try this:

textField.text = String.fromCharCode(0x023D2A)

Upvotes: 5

Related Questions