Use a return statement to exit a method under certain conditions
package{ import flash.display.Sprite;
public class Main extends Sprite{ public function Main(){
checkPassword("M");
checkPassword("S");
} private function checkPassword (password:String):void { if (password != "S") { return;
}
trace ("T");
}
}
}