Not signed in (Sign In)

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

  1.  
    I'm using the swfobject on a website I'm building a client of mine. Reason: So I can overlay an image over the swf.

    The swf is a flv player I have made for my client. My code is the following:

    ----------------

    <div id="flashcontent"><script type="text/javascript">
    var so = new SWFObject("http://67.19.87.227/ross/ross_player.swf", "ross_player", "362", "271", "8");
    so.addParam("allowfullscreen", "true");
    so.addParam("wmode", "opaque");
    so.addParam("quality", "high");
    so.addParam("FlashVars", "magic=9xj9kf9sn91y");
    so.write("flashcontent");
    </script> </div>

    ----------------

    For the fullscreen function, I'm using the param:

    so.addParam("allowfullscreen", "true");

    Can someone please help me as this is not working. The player full screens fine with the regular embed code:

    <embed allowScriptAccess="never" src="http://67.19.87.227/ross/ross_player.swf"
    Flashvars="magic=9xj9kf9sn91y" width="362" height="271"
    allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer ">
    </embed>

    The website I'm trying to embed this on is: http://www.1dawg.com/rosscopperman/
    I'm still working on cross-browser compatibility- it functions best in IE6 right now.

    Thank you in advance.
    • CommentAuthorphilip
    • CommentTimeNov 16th 2007 edited
     
    not sure about the full screen mode issue, but i'd change a few other things in your code...

    first of all, don't put the SWFObject JavaScript into the target DIV; this can lead to problems.

    this

    <div id="flashcontent">
    <script type="text/javascript">
    var so = new SWFObject(...);
    [...]
    so.write("flashcontent");
    </script>
    </div>


    should be this:

    <div id="flashcontent">
    </div>

    <script type="text/javascript">
    var so = new SWFObject(...);
    [...]
    so.write("flashcontent");
    </script>


    secondly, get rid of so.addParam("quality", "high")... this is a default param and doesn't need to be specified.

    third, for the FlashVars, use addVariable, not addParam. SWFObject will automatically stick it in FlashVars for you.

    so.addVariable("magic", "9xj9kf9sn91y");
    </script>


    parameters may be case-sensitive, so try allowFullScreen instead of allowfullscreen.

    so your end code should look like this:

    <div id="flashcontent">
    </div>

    <script type="text/javascript">
    var so = new SWFObject("http://67.19.87.227/ross/ross_player.swf", "ross_player", "362", "271", "8");
    so.addParam("allowFullScreen", "true");
    so.addParam("wmode", "opaque");
    so.addVariable("magic", "9xj9kf9sn91y");
    so.write("flashcontent");
    </script>


    also, don't use wmode unless you have to. it's a drain on the browser/computer.

    - philip
    • CommentAuthorAran
    • CommentTimeNov 17th 2007
     
    The allowFullScreen param is just a flash player setting for flash 9.0.28 and above to allow the player to go into fullscreen mode.

    See more here:
    http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

    So if you are only targetting player 8, then you code of:
    Stage.displayState = "fullScreen";

    will not actually dom anything.
  2.  
    Philip: I changed the code like you noted to:

    <div id="flashcontent">
    </div>
    <script type="text/javascript">
    var so = new SWFObject("http://67.19.87.227/ross/ross_player.swf", "ross_player", "362", "271", "9");
    so.addParam("allowFullScreen", "true");
    so.addParam("wmode", "opaque");
    so.addVariable("magic", "9xj9kf9sn91y");
    so.write("flashcontent");
    </script>

    And Aran, I changed it to 9. You both were correct in those regards.

    Fullscreen still doesn't work. So I took the note to remove "wmode" and it works!

    New problem:

    The reason I use so.addParam("wmode", "opaque"); is so the flash content layers behind the "video" title image.
    http://www.1dawg.com/rosscopperman/ <- see on this page

    Without wmode I can't accomplish that.

    Anyone know an override to use wmode & allowfullscreen?

    Thanks.
  3.  
    According to this article: http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode_print.html

    "Full-screen mode was not originally supported if the wmode is opaque or transparent windowless, but it is now supported starting with the latest Flash Player 9 Update on Adobe Labs. If the user has multiple monitors, Flash Player uses a metric to determine the monitor that contains the greatest portion of the Flash movie and then goes full-screen in that main monitor."

    I ran some tests and it only works with flash version 9.0.64.0 which currently is only available through Adobe Labs. http://labs.adobe.com/technologies/flashplayer9/

    =(

    Thanks for all your help guys.
    • CommentAuthorAran
    • CommentTimeNov 19th 2007
     
    I'm not sure of the date on that article, so you prob don't need 9.0.64. Have you tried the more common 9.0.47?

    Aran