Comunidad de diseño web y desarrollo en internet online

Embeber fuentes en Flash CS 5.5, ¿ha cambiado algo?

Citar            
MensajeEscrito el 30 Ago 2011 02:29 am
Hola a todos,

Después de leer varios posts en el foro referentes al tema en cuestión y de releer la ayuda de Flash, me dirijo al foro por si alguien pudiera echarme una mano. Estoy teniendo problemas con las cajas de texto dinámico, ya que mis textos nos se muestran. Parto de la base de que todo funcionaba perfectamente hasta que instalé la versión Flash CS 5.5. Desde entonces, los textos de la web que estaba desarrollando no se muestran y no consigo dar con el problema.
Se trata de varias cajas de texto creadas a partir de una clase donde se especifica el formato de las mismas.

A continuación, pego el código de dicha clase:

Código ActionScript :

package 
{

   import flash.display.Sprite;
   import flash.display.Graphics;
   import flash.display.Loader;
   import flash.net.URLRequest;
   import flash.events.Event;
   import flash.events.MouseEvent;
   import flash.text.TextFormat;
   import flash.text.TextField;
   import flash.text.TextFieldAutoSize;


   public class Clip_1 extends Sprite
   {

      [Embed(source = "UniversLTStd.otf",fontName = "univers_roman")]

      private var fuente:String;
      public var fondo_mc:Sprite;
      public var textos_mc:Sprite;
      private var donde_txt:TextField;
      private var elque_txt:TextField;
      private var cuando_txt:TextField;
      private var formato:TextFormat;
      private var formato_titular:TextFormat;
      private var i:uint;
      private var gr:Graphics;
      private var margen:uint = 10;
      private var clfondo:uint;
      var ancho:uint = 350;
      private var posY:uint;


      // MÉTODO CONSTRUCTOR
      public function Clip_profe(colorFondo:uint):void
      {
         clfondo = colorFondo;
         //fondo
         fondo_mc = new Sprite  ;
         addChild(fondo_mc);
         gr = fondo_mc.graphics;
         addChild(fondo_mc);
         gr.beginFill(colorFondo, .4);
         gr.drawRect(- margen,- margen, 790, 440);
         gr.endFill();

      }

      // MÉTODOS PROPIOS DE LA CLASE

      public function insertaTexto(donde:String, elque:String, cuando:String):void
      {
         // Contenedor textos
         textos_mc= new Sprite();
         addChild(textos_mc);
         //
         //
         formato_titular = new TextFormat  ;
         formato_titular.color = clfondo;
         formato_titular.font = "Font1";
         formato_titular.size = 14;
         formato_titular.kerning = true;
         //
         formato = new TextFormat  ;
         formato.color = 0x000000;
         formato.font = "Font1";
         formato.size = 13;
         //
         elque_txt = new TextField  ;
         elque_txt.text = " " + elque;
         elque_txt.width = ancho;
         elque_txt.background = true;
         elque_txt.backgroundColor = 0x333333;
         elque_txt.multiline = false;
         elque_txt.selectable = false;
         elque_txt.wordWrap = true;
         elque_txt.autoSize = TextFieldAutoSize.LEFT;
         elque_txt.setTextFormat(formato_titular);
         elque_txt.embedFonts = true;
         elque_txt.antiAliasType;
         elque_txt.y = margen;
         textos_mc.addChild(elque_txt);
         //;
         donde_txt = new TextField  ;
         donde_txt.text = " " + donde;
         donde_txt.width = ancho;
         donde_txt.background = true;
         donde_txt.backgroundColor = clfondo;
         donde_txt.multiline = false;
         donde_txt.selectable = false;
         donde_txt.autoSize = TextFieldAutoSize.LEFT;
         donde_txt.wordWrap = true;
         donde_txt.setTextFormat(formato);
         donde_txt.embedFonts = true;
         donde_txt.antiAliasType;
         donde_txt.y = elque_txt.y + elque_txt.height;
         textos_mc.addChild(donde_txt);
         //;
         cuando_txt = new TextField  ;
         cuando_txt.text = " " + cuando;
         cuando_txt.width = ancho;
         cuando_txt.background = true;
         cuando_txt.backgroundColor = clfondo;
         cuando_txt.multiline = false;
         cuando_txt.selectable = false;
         cuando_txt.autoSize = TextFieldAutoSize.LEFT;
         cuando_txt.wordWrap = true;
         cuando_txt.setTextFormat(formato);
         cuando_txt.embedFonts = true;
         cuando_txt.antiAliasType;
         cuando_txt.y = donde_txt.y + donde_txt.height;
         textos_mc.addChild(cuando_txt);

         //Coloca los textos;
         cuando_txt.x = donde_txt.x = elque_txt.x = margen;

      }
   }
}


¿Puedes ser que haya cambiado la manera de embeber la fuentes en Flash? Sin embargo, también he probado a embeber mi fuente a través del inspector de propiedades, pero siguen sin mostrarse... Ya no sé que más probar.

Gracias por vuestro tiempo.

Por AlenLoop

35 de clabLevel



 

chrome
Citar            
MensajeEscrito el 30 Ago 2011 02:31 am
(El nombre de la clase y del método constructor lo he cambiado por accidente. No lo tengáis en cuenta)

Por AlenLoop

35 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.