package me.tests { import mx.core.Application; import mx.controls.Alert; import flash.events.Event; public class TestFoo extends Application { public function TestFoo():void { this.addEventListener("creationComplete", alertPoo); } public function alertPoo(event:Event):void { Alert.show("poo!"); } } }