Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthortlsto
    • CommentTimeDec 28th 2007
     
    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.
    • CommentAuthorphilip
    • CommentTimeDec 28th 2007
     
    skins are often external files that need to be uploaded with the main SWF. i'd start by double-checking that you have all the files together.
    • CommentAuthortlsto
    • CommentTimeDec 28th 2007
     
    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"?
    • CommentAuthorphilip
    • CommentTimeDec 28th 2007
     
    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:

    FlashVars="skin=skin.swf&color=0xFFFFFF"

    you could do it in SWFObject like this:

    so.addvariable("skin", "skin.swf");
    so.addvariable("color", "0xFFFFFF");

    - philip
    • CommentAuthortlsto
    • CommentTimeDec 28th 2007
     
    Great, thanks! I'll give that a try.
    • CommentAuthortlsto
    • CommentTimeDec 29th 2007
     
    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?
    • CommentAuthortlsto
    • CommentTimeDec 29th 2007
     
    FIxed the problem! Thanks.
    • CommentAuthorblendering
    • CommentTimeMar 13th 2008
     
    How did you fix it?
    • CommentAuthorAran
    • CommentTimeMar 13th 2008
     
    @blendering

    What problem are you actually having? tlsto would have had to just put proper sizing parameters for the containing DIV via CSS etc.

    Aran