Packagenet.guttershark.util
Classpublic dynamic class QueryString
InheritanceQueryString Inheritance flash.utils.Proxy
ImplementsIDisposable

The QueryString class is used for reading query string parameters in the web browsers address bar. This class will only work when flash is embedded in a browser.

The QueryString class uses the flash_proxy namespace to override the getProperty method call. Which allows you to dynamically access any property defined in the query string without any complaint. Properties that are in the query string are read only


Example
Using the QueryString class when the swf is in a browser:
 
  var qs:QueryString = new QueryString();
  trace(qs.myQueryStringVariable);
  trace(qs.section);
  trace(qs.videoID);
  

Using the QueryString class outside of a browser:
 
  var qs:QueryString = new QueryString();
  var fakeQS:Dictionary = new Dictionary();
  fakeQS['videoID'] = 100;
  qs.querystringData = fakeQS;
  trace(qs.videoID);
  

In the above example, the myQueryStringVariable correlates directly to a query string variable. If that variable is present in the address bar, you will get that value, if it is not present, you will receive null.



Public Properties
 PropertyDefined by
  querystringData : Dictionary
[write-only] Allows you to set the query string data.
QueryString
Public Methods
 MethodDefined by
  
dispose():void
Dispose of the internally cached query string parameters.
QueryString
Protected Methods
 MethodDefined by
  
getProperty(name:*):*
Read a property from deeplink data.
QueryString
Property detail
querystringDataproperty
querystringData:Dictionary  [write-only]

Allows you to set the query string data. This is avaiable for situations when you are testing an application in the Flash IDE, but still need to rely on query string parameters. You can provide a hardcoded query string dictionary so that this class won't break your work, or cause you to have to treat logic differently just to work in the IDE.

Implementation
    public function set querystringData(value:Dictionary):void
Method detail
dispose()method
public function dispose():void

Dispose of the internally cached query string parameters.

getProperty()method 
flash_proxy override function getProperty(name:*):*

Read a property from deeplink data.

Parameters
name:*

Returns
*