1 Reply Latest reply on Feb 23, 2007 5:12 PM by kglad

    dynamic text formatting...

      I'm pretty new to ActionScripting, and am trying to change some of the formatting on some code...I've been stumbling through tutorials and putting pieces together roughly. Is there a simply way to change the font and justification of this text? code is as follows:
      var nWidth:Number = mcDisplayBackground._width;
      var nHeight:Number = mcDisplayBackground._height;
      var nX:Number = mcDisplayBackground._x;
      var nY:Number = mcDisplayBackground._y;
      var nInterval:Number;
      this.createTextField("tArticle", this.getNextHighestDepth(), nX, nY, nWidth, nHeight);
      tArticle.multiline = true;
      tArticle.wordWrap = true;
      tArticle.html - true
      tArticle.textColor = 0xFFFFFF;
      tArticle.htmlText = "Founded in 1989, CYW, Inc. has established itself as the leader in the construction fastener industry.";

      mcScrollUp.onPress = function():Void {
      nInterval = setInterval(scrollArticle, 50, "up");
      mcScrollUp.onRelease = function():Void {
      mcScrollDown.onPress = function():Void {
      nInterval = setInterval(scrollArticle, 50, "down");
      mcScrollDown.onRelease = function():Void {
      function scrollArticle(sScrollDirection:String):Void {
      if(sScrollDirection == "up") {
      else {

        • 1. Re: dynamic text formatting...
          kglad Adobe Community Professional & MVP
          there's no simple way to change the font. you can change the font, but to do that you must add a font to your library that has a linkage id, define a textformat object that has its font property assigned to that linkage id, enable the embedFonts property of your textfield and finally you must assign the textformat object to your textfield (using setTextFormat() or setNewTextFormat() ).