Embedding Flash in Template
Permalink
July 01, 2010 at 1:44 PM
I'm using the swfobject.js method, when I place the flash element into my template and look to load it hangs on the loading screen at 57%. When I run the flash in a straight html page it loads perfectly, so I'm not sure where my issue is at.
Here is my Head statement.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php Loader:: element ( 'header_required' ) ; ?>
<link href="<?php echo $this -> getThemePath ( ) ?> /c/style.css" type="text/css" rel="stylesheet" media="screen" />
<script src="<?php echo $this -> getThemePath ( ) ?> /js/swfobject.js" type="text/javascript" language="javascript"></script>
</head>
Then in my template I'm trying to load this in:
<?php
defined ( 'C5_EXECUTE' ) or die ( _ ( "Access Denied." ) ) ;
$this -> inc ( 'includes/header.php' ) ; ?>
<div id="banner">
<?php
$ah = new Area( 'banner' ) ;
$ah -> display ( $c ) ;
?>
</div>
</div>
<!--###########################-->
<!-- Content Layout -->
<!--###########################-->
<div id="content">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="920" height="500">
<?php
defined ( 'C5_EXECUTE' ) or die ( _ ( "Access Denied." ) ) ;
$this -> inc ( 'includes/header.php' ) ; ?>
<div id="banner">
<?php
$ah = new Area( 'banner' ) ;
$ah -> display ( $c ) ;
?>
</div>
</div>
<!--###########################-->
<!-- Content Layout -->
<!--###########################-->
<div id="content">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="920" height="500">
<param name="movie" value="<?= $this -> url ( '/' ) ?> nana_flash/main1.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="<?= $this -> url ( '/' ) ?> nana_flash/main1.swf" width="920" height="500">
<!--<![endif]-->
<div>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</div>
</div>
<?php $this -> inc ( 'includes/footer.php' ) ; ?>
I've attempted to hardcode and it does the same issue for me. The directories for the flash are CHMOD to 755. Any ideas please?
put this:
$this->addHeaderItem($html->javascript('swfobject.js'), 'CORE');