Replaces the characters "bcd" in the text "abcde" with the new text "x" : Text : TextField Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » TextField » Text »

 

Replaces the characters "bcd" in the text "abcde" with the new text "x"


 


package{
  import flash.display.Sprite;
  import flash.text.*;
  public class Main extends Sprite{
    public function Main(){

        var t:TextField = new TextField(  );
        t.text = "abcde";
        t.replaceText(14"x");
        trace(t.text);  // Displays: axe
        addChild(t);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo TextField
» Text