Posted By

imhugo on 01/16/08


Tagged

actionscript replace text


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Winkyboy


Replace Text


 / Published in: ActionScript
 

// "display_txt" is an instance name of an already created textfield // It's simply tracing the return value

  1. function replaceText( field:TextField, toSearch:String, toReplace:String)
  2. {
  3. return field.split(toSearch).join(toReplace);
  4. };
  5.  
  6. trace(replaceText(display_txt.text, "a", "b"));

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: DaemonFuga on June 18, 2009

Tankyou for the code, is very usseful.

BlueRaven.com.mx

You need to login to post a comment.