Access string method directly from the String value
package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ trace("banana".length); // 6 } } }