View Full Version : Em Dash in Flash
MikoLone
03-31-2003, 05:15 PM
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
Jesse
03-31-2003, 09:09 PM
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:
trace(escape("X"));
// where X is the character you want to know the escape sequence of
MikoLone
04-01-2003, 02:13 PM
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.
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
MikoLone
04-02-2003, 02:49 PM
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/flash/messageview.cfm?catid=194&threadid=413594&highlight_key=y&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.
:D
Jesse
04-03-2003, 04:58 AM
Yeah everyone's been talking abou this since FLash MX came out but I still forget about it when ppl ask such questions :)
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.