Skip to main content
twistedmedia
Known Participant
August 21, 2018
Answered

Emoji in text on stage

  • August 21, 2018
  • 2 replies
  • 3467 views

I'm trying to get text to display on stage, with the source from a string which contains an emoji.

You can paste an emoji into the actions window when you set the string, but when the text box displays on stage, the non-emoji characters render fine but no emoji shows. This is not surprising as you can't paste an emoji into a textbox on stage manually, either.

Not sure if there is a font that be included to get this to work but wanted to see if anyone has run into this before.

Thanks!

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

Chances are that you are using a font family that doesn't support emojis.

I run some tests with a few fonts and these special characters didn't show up.

But when I used the defaut _sans font family, they rendered normally.

I tried this:

txt.text = "   ‎      ‎         ⚽      ";

Note: Haha. It seems this online editor cannot render all the emojis I found. But don't worry. Here is...
FLA download: animate_cc_as3_emojis.zip - Google Drive

Just copy these ones or do a Internet search and then copy and paste them inside of the single/double quotes in your code.

This should work.

Regards,

JC

2 replies

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
August 23, 2018

Hi.

Chances are that you are using a font family that doesn't support emojis.

I run some tests with a few fonts and these special characters didn't show up.

But when I used the defaut _sans font family, they rendered normally.

I tried this:

txt.text = "   ‎      ‎         ⚽      ";

Note: Haha. It seems this online editor cannot render all the emojis I found. But don't worry. Here is...
FLA download: animate_cc_as3_emojis.zip - Google Drive

Just copy these ones or do a Internet search and then copy and paste them inside of the single/double quotes in your code.

This should work.

Regards,

JC

kglad
Community Expert
Community Expert
August 22, 2018

as3 or html5?

twistedmedia
Known Participant
August 22, 2018

as3

kglad
Community Expert
Community Expert
August 22, 2018

you can use html text to add emojis from your animate library.