Custom class dependencies: QueryParameters
The class works exactly the way you think it would except it has a couple of extras. One extra is that this class caches the value of any JavaScript call made by ExternalInterface. This way, if you need to call this class’s property more than once in a script the ExternalInterface method will only run once for the first time. The second extra is that all the URL parameters available in the ‘search’ property, is also available in the parameters property which is an instance of QueryParameters. This means that you may directly access one parameter of the current window’s URL, with all the string parsing already taken care of for you.
Without going on and on, please play around with the example below:
[swfobj src=”https://jidd.jimisaacs.com/files/2008/08/example-WindowLocation.swf” width=”500″ height=”200″ align=”center” required_player_version=”10.0.0″]
AS3 WindowLocation Example
Now here is the source of the class itself. Please make sure to review the QueryParameters class for additional information on this class.
com.jimisaacs.external.WindowLocation
Comment if you have any questions, or suggestions.
Leave a Reply