Skip to content

2. Integration with SWFAddress

epologee edited this page May 17, 2011 · 3 revisions

Implementing deeplinks into your application has never been easier. Create your application with the Navigator, and replace the constructor-call of new Navigator() with new SWFAddressNavigator() and you're done. You application states will be put in the browser's address bar and you don't have to do anything special for it!

Now there are always parts of an application's steps that you do not want to expose to the click-savvy end user, which is why you may hide certain states from them. Use Navigator-AS3 to handle all five steps of your super complex registration form, from /form/start/ to /form/finish/, but register everything below /form/ as 'hidden states' so the visitor won't ever see anything but /form/ in their address bar:

swfAddressNavigator.registerHiddenState("/form/*");

In addition, you may want to redirect users from an easy to remember link to a less easy to remember one:

swfAddressNavigator.registerRedirect("/gallery/", "/gallery/page/1/item/1");

SWFAddress integration is available for all other integration packages, like RobotLegs and PureMVC.

Check out the SWFAddressNavigator class for more information.