Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-31-2003, 06:15 PM   #1
MikoLone
Registered User
 
Join Date: Jul 2002
Location: Provo, UT
Posts: 33
Default Em Dash in Flash

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
MikoLone is offline   Reply With Quote
Old 03-31-2003, 10:09 PM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

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:
trace(escape("X")); // where X is the character you want to know the escape sequence of
__________________
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.
Jesse is offline   Reply With Quote
Old 04-01-2003, 03:13 PM   #3
MikoLone
Registered User
 
Join Date: Jul 2002
Location: Provo, UT
Posts: 33
Unhappy

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.
MikoLone is offline   Reply With Quote
Old 04-01-2003, 03:23 PM   #4
fgf
Registered User
 
fgf's Avatar
 
Join Date: Jan 2003
Location: edinburgh
Posts: 673
Default

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
fgf is offline   Reply With Quote
Old 04-02-2003, 03:49 PM   #5
MikoLone
Registered User
 
Join Date: Jul 2002
Location: Provo, UT
Posts: 33
Talking Success

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.

MikoLone is offline   Reply With Quote
Old 04-03-2003, 05:58 AM   #6
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

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.
Jesse is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:50 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.