Skip to main content
June 2, 2008
Question

URL Encoding Special Characters

  • June 2, 2008
  • 2 replies
  • 900 views
I'm using Flash 8 ActionScript2 and trying to display special characters in an external html file. On the HTML URL-Encoding Reference List ( http://www.w3schools.com/TAGS/ref_urlencode.asp) only the "URL-encoding from %00 to %8f" special characters are displaying. I can't seem to get the "URL-encoding from %90 to %ff" special characters to display. Does anyone know why this is happening.
This topic has been closed for replies.

2 replies

June 4, 2008
I tried the code you suggested below. As before, some of the special characters display, and some do not. For example, those that display are %ae, %2b, and %26, and those that do not are %97, %96 and %95. If anyone can solve this issue, I would appreciate.
June 2, 2008
<'Im using Flash 8 ActionScript2 and trying to display special characters in an external html file.

- Dont you mean "display special character in a text field that renders as html??

Here´s some answer to that question when you have problem with special character:

1. Try to embedd the fonts from that special language (EMBEDD)
2. Or you can try WINDOWS - OTHER PANELS - STRINGS
3. Install that special character on your windows system.

:-)



June 2, 2008
I'm not using a text field per sa, the ActionScript is calling the dynamic text file which is an html file. I've attached the code. Is this the reason why some of the special characters are not showing up. If I create a dynamic text field, and in the properties inspector select Render as HTML button, would this resolve my problem? Since I'm not using a dynamic text filed, I'm not quite sure how I would add the text file with the ActionScript I'm using. Any help is greatly appreciated.
June 2, 2008
Try this:

this.createTextField("textBox", this.getNextHighestDepth(), 0, 0, 435, 318);
textBox.multiline = true;
textBox.wordWrap = true;
textBox.textColor = 0xFFFFFF;
textBox.html = true;
textBox.condenseWhite = true;

//Load extenal html
var textBoxContent:LoadVars = new LoadVars();
textBoxContent.onData = function(sHTMLData:String):Void {
textBox.htmlText = sHTMLData;
};

//Create a CSS stylesheet object
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.onLoad = function():Void {
//This css style applied to the textBox
textBox.styleSheet = this;
textBoxContent.load("your.html");
};
//Load external css-file
cssStyles.load("styles.css");

:-)