Reputation: 16716
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?
Upvotes: 2
Views: 350
Reputation: 16716
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.
Upvotes: 2
Reputation: 4386
No, this is not possible, considering parameters is just a generic object with a bunch of essentially key/value pairs set by the query string or flashvars. There's nothing that indicates where any of these key/values are set.
The one thing you could do is control it on the server side, if you have access to the embed code. You could maybe write a script that would strip off any vars that appear on the query string and write the clean swf url to the page instead of one with the vars.
Also worth noting, flashvars take precedence over query string vars. So, if you have a foo=querystring
in the query string and foo=flashvars
in the flashvars, the value of foo will result as "flashvars".
Upvotes: 0