Search code examples
actionscript-3parametersquery-stringflashvarsloaderinfo

AS3: Is it possible to accept only FlashVars and ignore Query String params?


Adobe page for LoaderInfo states:

The two sources of parameters are: the query string in the URL of the main SWF file, and the value of the FlashVars HTML parameter (this affects only the main SWF file).

We would like to accept only FlashVars parameters and ignore the ones passed in as parts of Query String. Is this ever possible?


Solution

  • LoaderInfo has property url (root.loaderInfo.url), you can grab it, parse it and you will get parameters that were passed in with the query string. You can then subtract them from root.loaderInfo.parameters.

    This is the only way I could find so far. Suggestions appreciated.