Dynamic Text formatting

Subscribe to Dynamic Text formatting 6 posts

avatar for Smiggy Smiggy 1638 posts
Flag Post

How do you insert quotes into dynamic text? Say I want the text:

“So he says “give me cookie or give me death” while eating chicken."

But it needs to be dome in a dynamic text box for various reasons. Is there a C++ style \" or something like that to insert quotes?

 
avatar for arcaneCoder arcaneCoder 2354 posts
Flag Post

Yes. Either escape the character by using backslash ( \" ) or use single quote double quote combinations.

my_txt.text = "So he says \"give me cookie or give me death\" while eating chicken.";
my_txt.text = 'So he says "give me cookie or give me death" while eating chicken.';
 
avatar for Smiggy Smiggy 1638 posts
Flag Post

What about bold and italics?

 
avatar for arcaneCoder arcaneCoder 2354 posts
Flag Post

Did you try reading the Flash documentation on text fields and text formatting? It explains that stuff there..

If you want to use bold and italics, use the bold and italics html tags <b>bold</b> <i>italics</i>

 
avatar for Smiggy Smiggy 1638 posts
Flag Post

Wow, I’m pathetic. I almost never read documentation, because it always proves to be useless. At least Microsoft’s, anyway. Thanks a bunch Arcane!

EDIT: Yes, I know, Flash is Adobe/Macromedia, not Microsoft.

 
avatar for arcaneCoder arcaneCoder 2354 posts
Flag Post

Flash documentation will teach you a lot.