I want to access some flashvars in my preloader to a Flex application. How is this possible?
Regards Adlertz
I want to access some flashvars in my preloader to a Flex application. How is this possible?
Regards Adlertz
From the preloader, you should be able to access the flashvars indirectly through the SystemManager as follows:
var systemManager:SystemManager = parent.parent as SystemManager;
var params:Object = LoaderInfo(systemManager.loaderInfo).parameters;
I have accessed the flashvars using loaderinfo from the root of my preloader-sprite.
var flashvars:Object = root.loaderInfo.parameters;
The tricky part was to know when the root wasn't null. But I found a blogpost:
http://dndigital.net/blog/2008/08/accessing-flashvars-in-a-custom-flex-preloader/