0 Replies Latest reply on May 21, 2011 1:25 PM by Benydc92

    Flash 8 AS2 Smiles in chat

    Benydc92

      Hello all! I have a chatbox and I want to replace "" with an emoticon  and when I enter it the image comes on the left side behind the username  instead of being before text inputed. I changed the code using "  align='right' " and now it goes on right far away on message box [HTML  ISsue maybe]. I have attached the code, it is Flash 8 AS2. I was  thinking about making the image as movieclip and then trying to replace  it like that inside the library. Can anyone help please?

       

      users_so.msgFromSrvr = function(msg) {
          var _loc2 = new Array();
          _loc2 = msg.split("!!");
          if (_loc2[3] == "PRIVATE" && PRIVATE == 1 || _loc2[3] == "PUBLIC" && PRIVATE == 0) {
              String.prototype.replace = function(pattern, replacement) {
            return this.split(pattern).join(replacement);
              }
              my_str = _loc2[2];
              my_str = my_str.split(':)').join("<img src='URL\smile1.jpg' width='16' height='16' align='right' />");
              var _loc3 = "<font color=\'"+_loc2[1]+"\'>"+_loc2[0]+":"+my_str+"</font>";
              trace(my_str);
              _root.txHistory.htmlText = true;
              _root.txHistory.text = _root.txHistory.text+_loc3;
              
          }