String.prototype.simplify = function() : String { this = this.split(" ").join("_"); return this; }; var asdf:String = "Hello, world!"; trace(asdf.simplify()) //**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 10: There is no method with the name 'simplify'.