import com.peterjoel.utils.Config; import mx.utils.Delegate; class MyApp { private var appRoot:MovieClip; private var conf:Config; function MyApp(root:MovieClip){ appRoot = root; conf = Config.getInstance(); conf.load(appRoot); conf.addEventListener("load", Delegate.create(this, onConfLoaded)); } private function onConfLoaded(){ // start the app once the config is loaded initApp(); } private function initApp(){ // initApp here var debug:Boolean = Boolean(conf.getParam("debug")); var myURL:String = conf.getResource("myURL"); trace("debug: "+debug) trace("myURL: "+myURL) } }