Another issue of Flash is that you can’t access directly one page of the website through a link. For example, if you may want to show something to some of your friends, you send them the link to the website and you have to tell them to click here and here and here. If I am your friend, I won’t even click on the first link, because I will think “too complicated, don’t have time for that”. But let’s stay I click. I go to the Flash website, I have to wait for it to load and now there is an intro animation and now I have to find the link, the second link, etc. This is very annoying. But there is a way to fix that, that is called “deeplinking”.
Flash accept parameters. When you define it in a tag in your HTML page, you can pass it a few parameters. Thus, you can pass a variable that would indicate the page to display. Usually, the code is:
<param name=movie value=”flash_website.swf”>
If you pass it a few parameters, you have:
<param name=movie value=”flash_website.swf?page=contact”>
In the example above, you’re defining a variable called “page” and assign it the value “contact”. In your Flash movie, you’ll have a piece of code testing the value of “page” and that will go directly to the section indicated by the value of this variable.
Now, you have to define it in your URL: just add the page parameter to the end of your URL, just like for your Flash movie., and you’ll get: http://www.test.com/index.php?page=contact. The “index.php” will, thanks to PHP, pass this parameter to the Flash file and that’s it!
You can now have a feature on the website saying “send to a friend” and giving this url to send to your friend. And now, I’m willing to click on it!
More about deeplinking:
The next post will be about a more enhanced form of deeplinking.