3 Replies Latest reply on Aug 18, 2010 11:38 PM by webqaflash

    URLs one after the other?

    Ron Colmen Level 2

      When mgsA[3] is clicked, the URL opens one after the other (current url + requested url)!.

       

      E.g. Assume the swf is in www.main.com and the msgA{3} is www.sub.com

      When msgA[3] is clicked, the URL opens as http://www.main.com/www.sub.com

       

      receiveLoad.onData = function(src) {

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

           messageA.pop();

      var charCount = 0;

           var formatIndices = new Array();

      newszlatest.html=true;

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

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

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

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

                 charCount = newszlatest.text.length;

           }

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

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

           }

      }

       

      I need to fix it so it opens only www.sub.com in the new window.