package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ updateChatHistory("Hi", "Joe"); } private function updateChatHistory( message:String, username:String ):void { _history += username + ":" + message + '\n'; }; } }