Hi,

I was just trying to change some TextField code to TLFTextField. but the problem is when I change the text type, just nothing show up and the entire project doesn't load.

can any body help please? I would be grateful. and here is the code :


Actionscript Code:
package mainFile
{
    import flash.display.Sprite;
    import flash.events.Event;
   
    import fl.text.TLFTextField;
   
    //import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.text.TextFieldAutoSize;
    import flash.text.AntiAliasType;
    import flash.text.TextFieldType;
   

    public class Footer extends Sprite
    {
        private var _footerTxt:String = "© all rights reserverd";
        private var _textField:TLFTextField;
        private var _embedFonts:Boolean;

       
        public function Footer():void
        {
            this.addEventListener(Event.ADDED_TO_STAGE, stageAdded);
            this.addEventListener(Event.REMOVED_FROM_STAGE, stageRemoved);
        }
       
/////////////////////////////////////////////////////////////////////////////////////////////

        public function set embedFonts(a:Boolean):void
        {
            _embedFonts = a;
        }
       
        public function set msg(a:String):void
        {
            _footerTxt = a;
        }

/////////////////////////////////////////////////////////////////////////////////////////////
       
        private function stageRemoved(e:Event = null):void
        {
            this.removeEventListener(Event.REMOVED_FROM_STAGE, stageRemoved);
        }
       
        private function stageAdded(e:Event = null):void
        {
            this.removeEventListener(Event.ADDED_TO_STAGE, stageAdded);
           
            _textField = new TLFTextField();
            _textField.autoSize = TextFieldAutoSize.LEFT;
            _textField.antiAliasType = AntiAliasType.ADVANCED;
            _textField.embedFonts = _embedFonts;
            _textField.selectable = false;
           
            _textField.htmlText = _footerTxt;
            this.addChild(_textField);
        }
    }
   
}