1 Reply Latest reply on Sep 30, 2013 5:23 AM by Ned Murphy

    How to add one symbol in between the user give input.

    ramviswa123 Level 1

      Hi,

           In my flash had the following code.

       

      import flash.events.TextEvent;

       

      tf.addEventListener(TextEvent.TEXT_INPUT, tfHandler);

      function tfHandler(e:TextEvent):void{

          trace(e.target.text.length);

          if(e.target.text.length == 2){

              e.target.appendText("-");

              stage.focus = tf;

              tf.setSelection(tf.text.length,tf.text.length);

          }

      }

       

           Like this How to do in AS2.?

       

       

      Thanks with,

      Viswa