Home

Flurl

Get the latest version (1.7) here.

Flurl provides a javascript interface from Flex/Flash to the browser, usually referred to as deep linking. This allows you to:

- Listen for back and forward clicks / browser history changes by the user and respond accordingly
- Change the browser URL at runtime
- Change the page at runtime
- Change the minimum width and height of your swf at runtime
- Share links to a specific page via email or instant messenger

Flurl is a simple alternative to other solutions such as swfaddress and plays nicely with other tools such as swfobject and jquery.

Flurl has been tested on IE6+, Safari, Firefox and Opera.

Documentation

Example Usage

This is a very basic introduction, please see the Demos and Documentation for more information. This example assumes you have a swf file embedded into a html page.

1) Include the flurl.js file in your html page header:

<script src="/path/to/js/flurl.js" type="text/javascript" >

2) Write some actionscript that will tell Flurl what swf to load. The Swf_id parameter should match that of the id attribute on your page. This should be placed somewhere early on in your code so it initialises before everything else.

ExternalInterface.call("flurl.setSwf","Swf_id");

3) Write an actionscript callback function inside your swf. Flurl will call this function when the URL changes or the user clicks on a history button.

private function onUrlChange(url:String):void
{
    var parts:Array = url.split("/");
    trace("Page changed: ", parts.toString());
}

4) Register the callback function with Flurl and the actionscript ExternalInterface. If the function is not registered with ExternalInterface, Flurl will not be allowed to call it.

ExternalInterface.addCallback("onUrlChange", onUrlChange);
ExternalInterface.call("flurl.addCallback","onUrlChange");

5) When the user "changes page" within your swf, notify Flurl with the correct url for the new page.

var urlString:String = "/news/5";
ExternalInterface.call("flurl.setURL",urlString)

License

Flurl is licensed under the MIT License

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.