import flash.display.Sprite; package { class Foo { static var instance : Foo; public static function main () { instance = new Foo(); } function new () { var s = new Sprite(); trace( "hello" ); s. } } }