• Resolved auxano

    (@auxano)


    I am trying to embed this header: https://tinyurl.com/nnxu86 into this page: https://tinyurl.com/ms8hql . I have zero experience with flash and I’ve been searching through the forums for clues on how to make this work but haven’t found the solution yet. Hopefully it’s something simple.

    I have the following files in the theme folder:

    banner.swf
    banner.xml
    swfobject.js
    home-collage.jpg

    I have following in the head:

    <script type=”text/javascript” src=”swfobject.js”></script>
    <script type=”text/javascript”>
    swfobject.embedSWF(“banner.swf”, “banner”, “800”, “280”, “8.0.0”);
    </script>

    And I have the following in the home-page.php template:

    <div id=”banner”>
    If you see this you need to install Adobe flash player.
    </div>

    I know I’m missing something, but I have no idea what it is. Can someone help? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi-
    I was struggling with this issue all day. WordPress makes it very difficult to embed flash swf files into template pages. I tried using a few plugins and had no success. BUT…

    I finally realized that I could iFrame the embed code!!

    Say you want to embed an swf on index.php. In index.php, use this iframe code where you want the movie to appear:

    <iframe src ="https://pathtohtmlwithembedcode.com/embed.html" width="100%" height="295" frameborder="0" scrolling="no">
    </iframe>

    (you can set the height and width to whatever you want)

    Then, in embed.html, include the embed code for the flash swf. For example:

    <script src="script/swfobject_modified.js" type="text/javascript"></script>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="883" height="291" id="FlashID" title="">
      <param name="movie" value="https://pathtomovie.com/movie.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="8.0.35.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="script/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="https://pathtomovie.com/movie.swf" width="883" height="291">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="8.0.35.0" />
        <param name="expressinstall" value="script/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="https://www.adobe.com/go/getflashplayer"><img src="https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <script type="text/javascript">
    <!--
    swfobject.registerObject("FlashID");
    //-->
    </script>

    Hope this helps! I know how frustrating this problem can be.

    Oops, one more thing I forgot to mention. I noticed that this only worked for me if I put the swf and all of its related files in the root of my site. You can’t put it in the theme folder. Also, the html file with the embed code (ie: embed.html from my example) needs to be in the root.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Embedding flash in template’ is closed to new replies.