So i have a function which works like this:
blabla.swf?directlink=blabla
My problem is that people see this link:
index.php
blabla.swf is in a subfolder
**So what i want to do is something like this:
index.php?directlink=blabla Well at least something where i can put it into the main URL.
**
Is this possible? Does it work with flashvars or query string or something?
yeah, the PHP in your index.php script can read that "directlink" GET param, and then write it into the flashvars bit where it loads in the Flash blabla.swf.
You did something similar to make blabla turn straight to a page I think.
Originally posted by: DontBogartMe
You did something similar to make blabla turn straight to a page I think.
Well that's the thing right there.
I just copy blabla.swf in the root and it works like blabla.swf?directlink=blabla That's all fine but not when people have lightboxes and stuff like that in it, then it needs the javascript.
Wanted to find a solution for it.
Solved it. Was fairly easy with PHP
flashvars.directlink = "<?=$_GET["directlink"]?>";
Or even better with javascript so it also works in plain html:
if (swfobject.getQueryParamValue("directlink")) { flashvars.directlink = swfobject.getQueryParamValue("directlink");
}
You probably already know this, but SWFAddress works great for deep-linking in Flash.