Access flashvars in preloader in flex?

I want to access some flashvars in my preloader for a Flex application. How is this possible?

Regards Adlertz

+3
source share
3 answers

Try the loaderInfo.parameterspreloader attribute .

+4
source

From the preloader, you can access flashvars indirectly through the SystemManager as follows:

var systemManager:SystemManager = parent.parent as SystemManager;
var params:Object = LoaderInfo(systemManager.loaderInfo).parameters;
+1
source

I accessed flashvars using loaderinfo from the root of my sprite directory.

var flashvars: Object = root.loaderInfo.parameters;

The hard part was knowing when the root was not zero. But I found a blogpost:

http://dndigital.net/blog/2008/08/accessing-flashvars-in-a-custom-flex-preloader/

0
source

Source: https://habr.com/ru/post/1705247/


All Articles