| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jul 2002
Location: Provo, UT
Posts: 33
|
I use and XML document that sends text to an flash movie and displays it in a text box. I need to put em-dashes into the text but it doesn't interpet the html — nor does it interpret the unicode \u2014 either.
How can I get em-dashes into the text. Help! Thanks |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
try using the escape function to get the exscape sequence for the character you want, then unescape the string when you pull it back in:
ActionScript Code:
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Jul 2002
Location: Provo, UT
Posts: 33
|
I tried that and unfortunately it didn't work. It did give me an excape sequence but 1 I couldn't type an em dash into the code.
eg. trace(escape("--")); The result was "%2D%2D" but then I stuck that into a textbox and the result was %2d%2d. Is it impossible to add em-dashes into flash. Seems like they should have thought of that. Guess not. Thank you for replying. |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Jan 2003
Location: edinburgh
Posts: 673
|
trace(unescape("%2d%2d"));
results in -- You escape stuff before you send it and unescape once you've recieved it. Its the unescaped stuff you should be putting in the text box. fgf |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Jul 2002
Location: Provo, UT
Posts: 33
|
Ok, The escape/unescape thing was wonderful to learn about but I still couldn't figure out how to get an em-dash into the code.
We found this thread on the macromedia site. http://webforums.macromedia.com/flas...&keyword1=dash We put the line System.useCodePage=true; in our source code and then simple pasted in a em dash into the text file and it worked. Thanks for your help guys. Have fun. |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
Yeah everyone's been talking abou this since FLash MX came out but I still forget about it when ppl ask such questions
![]()
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|