Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/08/2009, 12:44
abigor66
 
Fecha de Ingreso: mayo-2008
Mensajes: 489
Antigüedad: 16 años
Puntos: 8
Pregunta Darle estilo a texto embebido

Buenas Tardes Foreros, el problema es el siguiente:
tengo un archivo Flash que llama el contenido de manera dinámica a través de textos externos y estos textos tienen asignados algunos estilos a través de un css que también es llamado de manera dinámica al archivo Flash. hasta ahí todo bien, pero ahora necesito embeber una fuente para asignársela al campo de texto dinámico que esta llamando el contenido y allí es donde se presenta el problema, cuando hago esto el texto ya no aparece, alguien sabe que tengo mal en el código?

Código actionscript:
Ver original
  1. var myCSS = new TextField.StyleSheet();  
  2. var cssURL = "main.css";  
  3.  
  4. myCSS.onLoad = function(exito) {  
  5.     texto.styleSheet    = this;  
  6.     texto.htmlText      = carga.externo;
  7. }
  8.  
  9. var my_fmt:TextFormat = new TextFormat();
  10. my_fmt.font = "myfuente";
  11. texto.embedFonts = true;
  12.  
  13. var carga:LoadVars = new LoadVars();
  14. carga.onLoad = function(exito:Boolean):Void {
  15.     myCSS.load(cssURL);
  16.     texto.htmlText = this.externo;
  17.     texto.setTextFormat(my_fmt);
  18. };
  19. carga.load("texto.txt");

Gracias por su tiempo y ayuda.