How to preform a string search and replace in flash using actionscript prototype
A prototype to replace a pattern in a string
String.prototype.replace = function(pattern, replacement) { return this.split(pattern).join(replacement); }
To use the prototype
var str = "hello world"; var newstr = str.replace("world", "Earth"); trace(newstr);
This will output: Hello Earth


