Deeplinking

Deeplinking with parameters

Maybe you have an image gallery on your site. You want to be able to deeplink to a specific image, but, because the gallery gets updated often, you cannot define all links in structure.xml. They need to be dynamic.

Check this: http://www.turtlebite.com/flebsite_demo_v2/en/service/some/more/info

The address defined in structure.xml is “/en/service/”. Everything which is beyond this scope will be stored in an array called deeplink. That way you can set up an event listener in your SWF and do whatever is needed, for example loading a certain image.

The great thing is that this page is also spidered. You can check this by typing in Google search bar:

site:http://www.turtlebite.com/flebsite_demo_v2/ some more

The code

function onDeeplink(event:FlebEvent)
{
    deeplinkAction();
}

function deeplinkAction()
{
    tf_deeplink.text = "";
    if (varcentral.flebDeeplink == null)
        return;
    for (var i:uint = 0; i < varcentral.flebDeeplink.length; i++)
    {
        tf_deeplink.appendText("deeplink[" + i + "]: " + varcentral.flebDeeplink[i] + "n");
    }
}

function onXMLLoaded(event:Event)
{
    .........
    deeplinkAction();
}

Warning! Flash firebug may not work with SWF address, so don't try tracing values in your browser.

Post A Comment

Anti-Spam Quiz: