ActionScript 3 TextArea htmlText styling using <span> tag
Tag : css , By : Josh Tegart
Date : March 29 2020, 07:55 AM
I hope this helps you . The htmlText supports only a limited set of tags and styles. Specifically, span supports only a class attribute which should be the name of a class specified in a StyleSheet object. You can use the font tag in this particular case. But remember that color supports only hexadecimal #ffffff values and size supports only absolute pixel size and relative (+2, -1 etc) size values. tags.htmlText = "<font color="#a89433" size="10">street</font>,
<font color="#b37620" size="11">motor</font>";
|
Actionscript 3 TextField bug with htmlText?
Date : March 29 2020, 07:55 AM
Does that help I reset defaultTextFormat every time I assign htmlText, nad it fixes it.
|
Anti-aliased htmlText in ActionScript?
Tag : flash , By : Jorge Palacio
Date : March 29 2020, 07:55 AM
Any of those help This thread helped. The trick is to assign a TextFormat instance (with the correct default font) to the defaultTextFormat property of the TextField instace. So the whole code becomes var tf : TextField = new TextField();
tf.selectable = false;
tf.width = w;
tf.height = h;
tf.autoSize = TextFieldAutoSize.LEFT;
tf.antiAliasType = AntiAliasType.ADVANCED;
tf.gridFitType = GridFitType.PIXEL;
tf.wordWrap = true;
tf.multiline = true;
tf.embedFonts = true;
var tff : TextFormat = new TextFormat();
tff.font = "Myriad Pro";
tf.defaultTextFormat = tff;
tf.styleSheet = _styles;
|
How do I use < or > inside of htmlText in actionscript?
Tag : flash , By : walkah
Date : March 29 2020, 07:55 AM
I wish this helpful for you to some suggestions from @s9tpepper and @mike_robbo on twitter I was actually able to use the following code to encode characters the way flash HTML likes it. /**
* Encode HTML.
*/
public static function htmlEncode(s:String):String
{
s = s.replace("&", "&");
s = s.replace(" ", " ");
s = s.replace("<", "<");
s = s.replace(">", ">");
s = s.replace("™", '™');
s = s.replace("®", '®');
s = s.replace("©", '©');
s = s.replace("€", "€");
s = s.replace("£", "£");
s = s.replace("—", "—");
s = s.replace("–", "–");
s = s.replace("…", "…");
s = s.replace("†", "†");
s = s.replace("·", "·");
s = s.replace("µ", "µ");
s = s.replace("«", "«");
s = s.replace("»", "»");
s = s.replace("•", "•");
s = s.replace("°", "°");
s = s.replace('"', """);
return s;
}
|
Using symbol from library in htmlText <img> tag in ActionScript 3
Date : March 29 2020, 07:55 AM
|