[RESOLVED] relative path from html rather that swf when embedding
Ok i have a bit of a problem, i was wondering if anyone had a solution.
I have a SWF which loads a config.php via the URLLoader class. Using a relative path from my SWF, i keep config.php & page.html in the same directory on my server.
However when i embed the SWF in HTML the relative path now goes relative from my HTML page! I don't want to keep my HTML in the same dir as my SWF or Config. This is part of a larger web app and will be loading on generated pages. I don't have the option of modifying the web app.
and my file structure is,
var ConfigLoad:URLLoader = new URLLoader;
If anyone could help that would be totaly awesome!
Last edited by Bigtallbill; 11-14-2008 at 05:10 AM.
You can try using the full URL: http://,,,,
Using the full path is not an option in this case. As the software may be deployed across multiple domains. Neither is using flashvars.
Editing the fla for every site should be avoidable.
Found out the problem!!
The problem is in the html embed. You have to add an extra param with the base dir where your swf is located. this has fixed all my references that were broken.
for instance i would put in my base param the value "/flash/"
this will set the base dir as my flash folder from server root without having to s use the full path "http://www.blahdomain.com/flash/".
from adobe livedocs
base directory or URL
(Optional) Specifies the base directory or URL used to resolve all relative path statements in the SWF file. This attribute is helpful when you keep SWF files in a different folder from your other files.
Click Here to Expand Forum to Full Width
Poll by Flashkit.com