WordPress.org

Ready to get started?Download WordPress

Forums

Add Transparent SWF to single page only (4 posts)

  1. ProFocus
    Member
    Posted 1 year ago #

    Hi,

    I have a static page generated using a plugin so that I can demo a marketing service where a transparent SWF is overlayed. I cannot really figure out how to do this within the wordpress framework however since any edits I make to the php, header, footer templates are global and I only want this overlay to appear on a single page (like the main index or about page).

    Does anyone have any ideas on how to cleanly integrate this?

    Here's our static demo page so you can see what we're doing:

    http://www.profocusmedia.com/Flash/DemoOverlay/

  2. You could do this using a conditional statement. So something like:

    <?php if( is_page( 'about' ) ) {
     do this...
    }?>

    Here some more info abou this - http://codex.wordpress.org/Conditional_Tags

  3. ProFocus
    Member
    Posted 1 year ago #

    That would solve part of it. Thanks for the help!

  4. ProFocus
    Member
    Posted 1 year ago #

    Hmm, this is more difficult than I thought it would be. On my static page, I create an apDIV in the <Head>, the place the actual swf embed code contained in the apDIV down in the <Body>. Works great.

    I was hoping that I could put the apDIV declaration and parameters in the <Head> of the Header.php file of my theme and the actual container with the embed code in the <Body> of the Header.php or the Footer.php. I don't get any errors, but nothing is working. I look at the page source to make sure that the code is there after updating the php and it is, just like It should be, but the file isn't loading.

    Does this make sense? Any ideas about this approach? I'm okay with basic HTML, but I'm not a web programmer.

    Here are the two sections of code I'm using in the working static pages.

    Head

    <style type="text/css">
    #apDiv1 {
    	position: fixed;
    	width: 640px;
    	height: 360px;
    	z-index: 100;
    	left: 0px;
    	bottom: 0px;
    }
    
    </style>

    Body

    <div id="apDiv1">
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="360" id="VBC_Abner_Email_360" align="middle">
          <param name="movie" value="http://www.profocusmedia.com/Flash/DemoOverlay/VBC_Abner_Email_360.swf" />
          <param name="quality" value="high" />
          <param name="bgcolor" value="#666666" />
          <param name="play" value="true" />
          <param name="loop" value="false" />
          <param name="wmode" value="transparent" />
          <param name="scale" value="showall" />
          <param name="menu" value="true" />
          <param name="devicefont" value="false" />
          <param name="salign" value="" />
          <param name="allowScriptAccess" value="sameDomain" />
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="VBC_Abner_Email_360.swf" width="640" height="360">
            <param name="movie" value="http://www.profocusmedia.com/Flash/DemoOverlay/VBC_Abner_Email_360.swf" />
            <param name="quality" value="high" />
            <param name="bgcolor" value="#666666" />
            <param name="play" value="true" />
            <param name="loop" value="false" />
            <param name="wmode" value="transparent" />
            <param name="scale" value="showall" />
            <param name="menu" value="true" />
            <param name="devicefont" value="false" />
            <param name="salign" value="" />
            <param name="allowScriptAccess" value="sameDomain" />
            <!--<![endif]-->
            <a href="http://www.adobe.com/go/getflash"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>
      </div>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.