1 Reply Latest reply on Jun 21, 2010 7:24 AM by kglad

    Scale textfield

    Bola.orginal

      So I've got one more problem because the font size limit on 127px I need to scale my dynamic text so it can be bigger. So here the code I tought could work:

      this.createEmptyMovieClip("text1_mc",1);

       

      var format:TextFormat = new TextFormat();

      format.size = 20;

       

      _root.text1_mc.createTextField("t",1,0,0,10,10);

      _root.text1_mc.t.autoSize = "left";

      _root.text1_mc.t.text = "BIG TEXT";

      _root.text1_mc.t.setTextFormat(format);

       

      _root.text1_mc.t.scaleX = 200;

      _root.text1_mc.t.scaleY = 200;

      addChild(_root.text1_mc.t);

      But it dosen't, so any suggestion where it could be wrong?

        • 1. Re: Scale textfield
          kglad Adobe Community Professional & MVP

          you're mixing as2 and as3.  if you're publishing for as2, use:

           


           

           

          this.createEmptyMovieClip("text1_mc",1);

           

          var format:TextFormat = new TextFormat();

          format.size = 20;

           

          _root.text1_mc.createTextField("t",1,0,0,10,10);

          _root.text1_mc.t.autoSize = "left";

          _root.text1_mc.t.text = "BIG TEXT";

          _root.text1_mc.t.setTextFormat(format);

           

          _root.text1_mc.t._xscale = 200;

          _root.text1_mc.t._yscale = 200;