Hi, I was wondering how you would go about setting first param of the SWFObject as a fullpath.
var address = "http://www.mysite.com/indexNew.swf"; var so = new SWFObject(address, "indexNew", "100%", "100%", "8", "#FFFFFF"); so.addParam("scale", "noscale"); so.write("flashcontent");
When I try the above code, it ends up performing a redirect, as soon as the page loads, it goes directly to http://www.mysite.com/indexNew.swf
There is not reason that I know of that would cause a redirection on full path definition. I have seen many projects using code similar to the above. You can try copying one of the exmple pages from the swfobject examples and replace it with your full path. I think you'll see it working as intended
Can you please post your full HTML page so we can see what else is going on?
<div id="flashcontent"> <strong>Welcome to the lynching mob. <br />You need to upgrade your Flash Player to Version 8.</strong> </div>
<script type="text/javascript"> // <![CDATA[
var so = new SWFObject("indexNew.swf", "indexNew", "100%", "100%", "8", "#FFFFFF"); so.addParam("scale", "noscale"); so.write("flashcontent");
// ]]> </script>
</body> </html>
After a bit of tweaking, it no longer redirects, but it doesn't load the pages that I want (for the most part. To clarify that, I'm trying to implement clean URLs (tutorial here: http://www.kirupa.com/developer/php/clean_url_pg1.htm) , and if the url is www.mysite.com/firstvar , everything works fine, but if I try anything that ends with a / such as www.mysite.com/firstvar/ or www.mysite.com/firstvar/secondvar , it loads the page, replaces the div like it should, but doesn't display any content.
Hello, I am also trying to implement clean urls. I have the same problem, my swf won't show up when the second "variable" or an extra backslash is typed in the url. I am wondering if this is an issue with the flash player or swfobject or neither. Have you found a solution or do you have any further thoughts on the subject?