Getting URL Parameters in Flex
Category: Flex Plugins | 1,032 views | Add a Comment
The class uses javascript to get all of the url information, including host name, port, and url parameters among other things. The most helpful method you will find is getParameterValue(key:String):String which will give you back the parameter value for the given key.
Have multiple environments and need to get the full url with the host name and port in actionscript?
There are several methods to help with this:
getHostName()
getPort()
getProtocol() -such as http or https
getContext() -The path after the hostname but before the url parameters
Attached is the source. You can see that the methods are all static and use javascript to get the information back to flex. It is designed to get this information regardless of where the flex swf file lives since most people have them embeded in an html file.
- No Related Post







