Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: SWFObject to embed flash (problem in Firefox)

  1. #16
    Good stuff

    Don't forget that the SWFObject solution is only aimed at IE and not the other browsers.
    2006-11 GlosRFC - Searching 8,168,684,336 brain cells

  2. #17
    Quote Originally Posted by glosrfc View Post
    Don't forget that the SWFObject solution is only aimed at IE and not the other browsers.
    Are you sure? Here's a quote from the SWFObjects page:
    SWFObject is a small Javascript file used for embedding Macromedia Flash content. The script can detect the Flash plug-in in all major web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible, so it should work for years to come.
    Sounds like cross browser to me. It's working now for me in IE and Firefox, so that's good enough for me!

  3. #18
    Quote Originally Posted by Benek View Post
    Are you sure? Here's a quote from the SWFObjects page:


    Sounds like cross browser to me. It's working now for me in IE and Firefox, so that's good enough for me!
    He meant that the only reason it was really made was for IE and the Eolas bug.
    http://www.fusionauthority.com/News/...ou-Updated.htm

    It is cross browser. Plus it makes it easier to pass vars to the swf and little stuff like that.
    Glad ya got it fixed

  4. #19
    Im at my wits end looking for the holy grail of flash embedding code since it has to be:

    1) W3C (any XHTML doc type ie: trans/strict/etc),
    2) flash 8 detecting with alternate ('image' rather than page or jusy type redirect) if not detected
    3) ignore this stupid Eolas/MS issue in IE

    i can get say 1 and 2 to work, or 1 and 3, or even 2 and 3 but all together in one script/source file? hehe nope.

    so, basically, can anyone on here help me, please?

    thanks in advance..

  5. #20
    Just use the swfObject posted in the first post. It gets all three.

  6. #21
    Hey, I came across this thread by searching after having a similar issue. I'm leaving the solution for others. It turns out that you can set the scale and alignment with html params, you just need to get them in the correct order.

    This code:
    Code:
       var so = new SWFObject("nzog.swf", "nzography", "100%", "100%", "8", "#EBE9E5");
       so.addParam("salign", "lt");
       so.addParam("loop", "false");
       so.addParam("menu", "false");
       so.addParam("quality", "high");
       so.addParam("scale", "noscale");
       so.addParam("align", "middle");
       so.write("flashcontent");
    does not work because the salign tag is first, whereas it should be last.

    When you publish a Movie with Flash CS3 you get a bunch AC_RunActiveContent JavaScript code in the generated HTML file. A good rule of thumb when using SWFObject is to add your parameters in the same order as they are given in AC_RunActiveContent., i.e.:
    Code:
    AC_FL_RunContent(
                'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                'width', '500',
                'height', '55',
                'src', 'page_title',
                'quality', 'high',
                'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                'align', 'middle',
                'play', 'true',
                'loop', 'true',
                'scale', 'noscale',
                'wmode', 'window',
                'devicefont', 'false',
                'id', 'page_title',
                'bgcolor', '#ffffff',
                'name', 'page_title',
                'menu', 'true',
                'allowFullScreen', 'false',
                'allowScriptAccess','sameDomain',
                'movie', 'page_title',
                'salign', 'l'
                ); //end AC code
    This is the correct form for the SWFObject script:
    Code:
       var so = new SWFObject("nzog.swf", "nzography", "100%", "100%", "8", "#EBE9E5");
       
       //note: these parameters follow the same order given in AC_RunActiveContent.js
       so.addParam("quality", "high");
       so.addParam("align", "middle");
       so.addParam("loop", "false");
       so.addParam("scale", "noscale");
       so.addParam("menu", "false");
       so.addParam("salign", "lt"); //shifted to last
       so.write("flashcontent");

  7. #22
    Hello.
    Its an old thread, but thank you Boomcallister. It seems if the "salign" parameter goes before the "scale" parameter, things get shifted around in Mozilla-based browsers.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012