Static Flash links and better way to handle Dear Mambers,
Recently i had to work with a Mambo template with flash links. To my knowledge, i know that Mambo does not support Image or flash links unless we are doing some work arounds.
Flash has the ability to read the external file. So, people generally provide links as variables in a text file and the file will be called from the flash.
But here in my template , the links are in flash header. i.e., all 5 links in a single flash. So i decided to do one way to handle the links.
In flash actionscript i coded geturl("mylinks.php?link=1") for each button. The second button is coded as geturl("mylinks.php?link=2") and so.
In the mylinks.php file i wrote the code as follows.
<?php
//This is mylinks.php
$button1 = "index.php?option=com_content&task=view&id=30&Item id=51";
$button2 = "index.php?option=com_content&task=view&id=31&Item id=52";
$button3 = "index.php?option=com_content&task=view&id=32&Item id=53";
if ($link == 1)
{
header("Location: ".$button1);
}
if ($link == 2)
{
header("Location: ".$button2);
}
if ($link == 3)
{
header("Location: ".$button3);
}
?>
This is a simple code. When i click on the flash link button 1, "mylinks.php?link=1" will be called to browser. Then the mylinks.php file will process the things. As i have already defined, this link gets redirected to related link that is assigned.
I dont know whether it is a better way or bad way to handle static flash buttons. But , i really like to do this because, i dont need to recompile flash everytime the link is updated. Most of the sites with flash links generally are static. So for that purpose this type of code can be written.
Please post what you think on it. Thank you,
Regards,
Vrajesh
Last edited by vrajesh; 20.10.2004 at 23:57.
Reason: Spelling
|