Flex 2: How to get URL query-string variables within Flex application
This has been a reoccurring problem on flexcoders and in the small circle of Flex developers I know. It is a problem that I had encountered and thought that I had found an answer; Abdul Qabiz's Blog posting (duplicated) had described a (in his own words) "quick-and-dirty" solution. That method works well for pulling the String value of the parameters passed in the query-string, but what do you do when those values are URL Encoded? Below is my (and I use my very loosely as it isn't much to claim) solution that provides similar behavior as described in Abdul's posting, but requires significantly less code and is much more readable:
Given the URL:
http://deepthoughts.orsomethinglikethat.com?myParam=My%20Value
the return value is "My Value".
This may not be the ideal solution if the URL is pointed directly to the SWF or if you choose to make your parameters available via FlashVars.







This article is exactly what I am looking for.
Unfortunately, the code is missing from the page.
Is there any way to fix this in the post ?
Any info would be helpful.
Thanks,
Mike Gray
michael.gray.m2k@fmr.com
Mike,
I’ve updated the post with the linked source.
I had been having problems with the WordPress plugin I’d been using. I’ve since given up on embedding the source.
I hope this helps. Let me know if you have any other questions.