Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/09/2006, 12:23
Avatar de hieloverde
hieloverde
 
Fecha de Ingreso: julio-2005
Ubicación: México, D.F
Mensajes: 467
Antigüedad: 18 años, 9 meses
Puntos: 5
Problema al usar fuente embebida en AS

Hola,

Estoy trabajando una marquesina en Flash, el texto es dinámico, hasta ahí funciona todo bien, el problema surge al activar el uso de fuentes embebidas ya que no muestra el texto (como si la fuente que solicito no existiera), pero yo estoy mas que seguro que esa fuente esta en la librería del proyecto, y además las opciones de Linkage: “Export for Action Script” y “Export in first frame” están marcadas. La fuente la he llamado simplemente “mi_fuente”.


Código:
/* Fuente */
var formato:TextFormat = new TextFormat();
formato.font = "mi_fuente";
formato.color = 0xFFFFFF;

/* Creacion de la caja de texto dinamica */
this.createTextField("caja_texto", 1, 0, 0, 550, 20);
caja_texto.embedFonts= true;

/* Propiedades */
caja_texto.backgroundColor= 0xFF0000;
caja_texto.speed = 1;
caja_texto.antiAliasType = "advanced";
caja_texto.text = "Hola mundo";
caja_texto.setTextFormat(0,caja_texto.length,formato)

/* Configuracion */
caja_texto.spaceSize = caja_texto.getNewTextFormat().getTextExtent(" ").width;
caja_texto.spacesRequired = Math.ceil(caja_texto._width / caja_texto.spaceSize);
for (var i = 0; i < caja_texto.spacesRequired; i++) 
{
    caja_texto.spacebuffer += " ";
}
caja_texto.text = caja_texto.spacebuffer + caja_texto.text + caja_texto.spacebuffer;
caja_texto.hscrollInterval = function () 
{
    if (this.hscroll == this.maxhscroll) 
    {
        this.hscroll = 0;
    }
    this.hscroll += this.speed;
}

setInterval(caja_texto, "hscrollInterval", 20);
Saludos y gracias.
__________________
<? echo("1 <script> dice + que 1000 palabras"); ?> EspacioMéxico