Dar formato a un texto de Flash usando CSS externo
En este tuturial explicaré cómo dar formato a un texto de Flash usando un CSS externo.
Este es el codigo flash:
- css_txt.html = true;
- miCSS = new TextField.StyleSheet();
- miCSS.onLoad = function(success) {
- if (success) {
- trace(this.getStyleNames());
- css_txt.styleSheet = miCSS;
- css_txt.htmlText = “
Utilizando el formato AnaS! Esto es un texto rojo Este es un texto utilizando beatiful! “; - } else {
- trace(”Lo siento! Ha ocurrido un error!”);
- }
- };
- miCSS.load(”estilo.css”);
Este es el codigo css:
- AnaS {
- color:#000000;
- font-size: 15px;
- }
- red {
- color:#CC0099;
- font-size:20px;
- text-align:center;
- text-decoration:underline;
- }
- beautiful {
- color:#333366;
- font-size:10px;
- text-align:right;
- }
2 comments March 14th, 2007