To make it had to declare "instance" in ApplicationFacade as a private static var. Is this still respecting the singleton pattern ?
In my ApplicationMediator which is holding the reference to the "root" of my application and is being created by ViewPrepCommand i am placing a preloaderMC on the stage:
var preloaderMC:Preloader = new Preloader();
facade.registerMediator( new PreloaderMediator(preloaderMC));
but when i place this code
on the time line of the swf to load and publish, it runs through all the ApplicationFacade code gets to the ApplicationMediator and returns an error because it can't find the loadingBarMC being reference in the Preloader class because the preloaderMC is not in the swf library...
so if i comment out the instantiation of the preloader in the ApplicationMediator and then publish the swf it works fine... then i enable the instantiation on the preloader in the ApplicationMediator publish and my application works.
Basically the reference to view components in the ApplicationMediator is generating errors when you publish the swf that don't have these view components in there libraries...