www.webdeveloper.com
Results 1 to 3 of 3

Thread: Insert .SWF in header HOW!

  1. #1
    Join Date
    Nov 2013
    Posts
    3

    Insert .SWF in header HOW!

    Hello, I'm a new membor to the websites - community so probably my problem is a piece of cake for you gays.
    I've instal a Drupal distribution to my site www.snowystudio.com and i want to make the iner header a .swf file instead of .png so all the things in the picture to be buttons and to have animation, not just be static. The other things I want to do is to make the .png opens if the person does not have flash player, so in no ircumstances the "download flash" message to be displayed.
    The problem is that the code for the header background as far as i saw is in page.css and i read that the .swf should only be insert in the page.tpl.php beacause the .css does not support .swf. What should I do? I found this code for inserting .swf

    Code:
    <div class="header">
    <?php if(drupal_is_front_page())
       {
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="786" height="147">
          <param name="movie" value="themes/your theme name/images/front page swf file name.swf" />
          <param name="quality" value="high" />
    <embed src="themes/your theme name/images/front page swf file name.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="786" height="147"></embed>
        </object>
         }
     else
       {
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="786" height="147">
          <param name="movie" value="themes/your theme name/images/inner page swf file name.swf" />
          <param name="quality" value="high" />
    <embed src="themes/your theme name/images/inner page swf file name.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="786" height="147"></embed>
        </object>
       }
    ?>
    </div>
    So where should that go? The code in the page.css for the header is:

    Code:
    * Header
     */
    #header-wrapper {
      background: url(../images/bg-header.jpg) 0 0 repeat-x;
      border-top: 5px solid #1a1a1a;
    }
    .front #header-wrapper {
      background: url(../images/bg-header-front.jpg) 0 0 repeat-x #d69436;
      border-top: 5px solid #1a1a1a;
      min-height: 559px;
    }
    .front .header-inner {
      background: url(../images/bg-header-2.png) 50% 0 no-repeat;
    }
    #header-wrapper .container {
      padding: 0;
    }
    #header {
      clear: both;
      margin-bottom: 15px;
      position: relative;
      text-align: center;
    }
    .front #header {
      min-height: 130px;
    }
    And if i replace the .png with the .swf nothing happens.
    The code for the header in page.tpl.php is:

    Code:
    <!-- HEADER -->
    		<div class="container <?php print $grid; ?>">
    		  <div class="grid-inner clearfix">
    			<div id="header" class="clearfix">
    			  <?php if ($logo): ?>
    				<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" id="logo">
    				  <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
    				</a>
    			  <?php endif; ?>
    			  <?php if ($site_name || $site_slogan): ?>
    				<div id="name-and-slogan" class="hgroup">
    				  <?php if ($site_name): ?>
    					<h1 class="site-name">
    					  <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>">
    <?php print $site_name; ?>
    					  </a>
    					</h1>
    				  <?php endif; ?>
    				  <?php if ($site_slogan): ?>
    					<p class="site-slogan"><?php print $site_slogan; ?></p>
    				  <?php endif; ?>
    				</div>
    			  <?php endif; ?>
    			  <?php if ($header = render($page['header'])): print $header; endif; ?>          
    			  <?php if ($secondary_menu): ?>
    				<div id="secondary-menu" class="navigation">
    				  <?php print theme('links__system_secondary_menu', array(
                        'links' => $secondary_menu,
                        'attributes' => array(
                          'id' => 'secondary-menu-links',
                          'class' => array('links', 'inline', 'clearfix'),
                        ),
                        'heading' => array(
                          'text' => t('Secondary menu'),
                          'level' => 'h2',
                          'class' => array('element-invisible'),
                        ),
                      )); ?>
    				</div> <!-- /#secondary-menu -->
    			  <?php endif; ?>
    			  </div>
    		  </div>
    		</div>  
    	  <?php if ($slideshow = render($page['slideshow'])): ?>
    		<!-- SLIDESHOW -->
    		<div id="slideshow-wrapper" class="wrapper">
    		  <div class="container <?php print $grid; ?>">
    			<div class="grid-inner clearfix">
    			  <?php print $slideshow; ?>
    			</div>
    		  </div>
    		</div>
    		<!-- //SLIDESHOW -->
    	  <?php endif;?>
       </div>
      </div>
      <!-- //HEADER -->
    And when I insert the code for the.swf I found, still nothing happens!
    Help me please!

  2. #2
    Join Date
    Nov 2013
    Posts
    3
    Does anybody know? Please! I really whant to know how to do it!

  3. #3
    Join Date
    Nov 2013
    Posts
    3
    Really, no one knows?

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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



Recent Articles