4 Replies Latest reply on Aug 19, 2010 5:22 AM by Ned Murphy

    text.html=true : open in new window?

    Ron Colmen Level 2

      1. How can I make msgA[3] text #C0C0C0?

      2. How can I make mgsA[3] open in a new window?

       

       

      var format1:TextFormat = new TextFormat();

      format1.bold = true;

      format1.color = 0x666666;

      format1.size = 15;

      this.createTextField("scroll_txt", this.getNextHighestDepth(), 143, 170, 648, 233);

      this.createTextField("newszlatestcat", this.getNextHighestDepth(), 143, 170, 648, 233);

      newszlatestcat.multiline = true;

      newszlatestcat.wordWrap = true;

      newszlatestcat.textColor = 0xFFFFFF;

      senderLoad.sendAndLoad("http://www.abc.com/my.php",receiveLoad,"POST");

      receiveLoad.onData = function(src) {

           var messageA:Array = src.split(",,,");

           messageA.pop();

      var charCount = 0;

           var formatIndices = new Array();

      newszlatestcat.html=true;

           for(var i:Number=0; i<messageA.length; i++){

                 var msgA:Array = messageA[i].split(",,");

                 newszlatestcat.htmlText += msgA[0]+msgA[1].split(" ")[0]+"<br>"+msgA[2]+"<br><b>Link |  </b><a href='"+msgA[3]+"'>"+msgA[3]+"<\a><br>"+hrF(newszlatestcat,"_",0x333333)+"<br><br>";

                 formatIndices[i] = {startAt: charCount, endAt: charCount+msgA[0].length};

                 charCount = newszlatestcat.text.length;

           }

           for(var j:Number=0; j<formatIndices.length; j++){

                 newszlatestcat.setTextFormat(formatIndices[j].startAt, formatIndices[j].endAt, format1);

           }

      };