I'm using SWFObject to load a SWF that is a container for an FLV. I applied a skin to the SWF with Flash Professional 8, but it doesn't show up when I call the SWF with SWFObject. My original SWF looks correct when I access it's complete url.
Also, I set the size arguments to 400 and 550, respectively, though the FLV is 320 by 240. (I took the height and width settings from the html code Flash created from my file.) When I view the SWF on my site using SWFObject, however, the size looks approximately 100 by 130.
Here is the basic code I'm using:
---- <div id="flashcontent"> <p>You either have JavaScript turned off or an old version of Adobe's Flash Player.</p> </div> <script type="text/javascript"> // <![CDATA[ var so = new SWFObject("http://example.com/movies/isiFlash/ISI_320x240.swf", "ISI_320x240", "400", "550", "8", "#fff"); so.write("flashcontent"); // ]]> </script> ----
I've tried to add parameters and variables to no avail. Am I missing something? Anyone have any ideas? This is the first time I've used SWFObject.
Thanks, yes I uploaded all the files to the same directory: example.com/movies/isiFlash/example.swf.
Do I need to reference the skin SWF in the script? I'm not really sure how to do that. I thought you could just add a variable (by using so.addVariable) that referenced the skin SWF, but how do I know what variable to use? Something like "controller_src" or "controller"?
the easiest thing to do is to get the page working with the traditional Adobe embed, then copy the parameters to SWFObject and remove the original Adobe code. whatever SWF the Adobe code is pointing to is what should be in your SWFObject code.
be sure to note any FlashVars parameters that may be getting passed. these are very commen elements when working with FLVs and skins. you can add the FlashVars variables to SWFObject using addVariable. for instance if your original code had FlashVars that look like this:
I finally figured out why the skin wasn't loading. I didn't have the skin's directory correct (stupid me, a typo) in the FLA's parameters. Now the skin successfully loads.
However, I'm still having the problem with SWFObject somehow resizing the SWF/FLV smaller. When I uploaded my movie the Adobe embed way, the size was correct, but there weren't any Flash Variables in the HTML it created. So I'm thinking the problem is with SWFObject.
Not sure what the problem is. Should I post a new thread on this topic?