This most popular question the “how to Embed Flash in Joomla template” was originally posted at Joomla! Forum on February 29, 2008 by denward. A very interesting look in the inside where Joomla! community is helping one another at the same time peek the Joomla! code.
Question: What’s missing in the code? Why it didn’t work? What is the solution?
Please review the code below and find the missing codes.
<?php
defined( ‘_VALID_MOS’ ) or die( ‘Restricted access’ );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( ‘=’, _ISO );
// xml prolog
echo ‘<?xml version=”1.0″ encoding=”‘. $iso[1] .'”?’ .’>’;
?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<head>
//code at index.php templates_directory …edited by ultimoadios, newyork joomla!
<?php
<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://fpdownload.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0″ width=”802″ height=”173″ id=”any” align=”middle”> <param name=”allowScriptAccess” value=”sameDomain” /> <param name=”movie” value=”templates/blue_web_group/images/head.swf” /> <param name=”quality” value=”high” /> <param name=”bgcolor” value=”#666666″ /> <embed src=”templates/blue_web_group/images/head.swf” quality=”high” bgcolor=”#666666″ width=”780″ height=”550″ name=”any” align=”middle” allowscriptaccess=”sameDomain” type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/getflashplayer” /></embed> </object>
?>
<?php
defined( ‘_VALID_MOS’ ) or die( ‘Direct Access to this location is not allowed.’ );
include($mosConfig_absolute_path.”/templates/blue_web_group/js/mysplitcssmenu.php”);
?>
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
initEditor();
}
$collspan_offset = ( mosCountModules( ‘right’ ) + mosCountModules( ‘user2’ ) ) ? 2 : 1;
//script to determine which div setup for layout to use based on module configuration
$user1 = 0;
$user2 = 0;
$colspan = 0;
$right = 0;
// banner combos
//user1 combos
if ( mosCountModules( ‘user1’ ) + mosCountModules( ‘user2’ ) == 2) {
$user1 = 2;
$user2 = 2;
$colspan = 3;
} elseif ( mosCountModules( ‘user1’ ) == 1 ) {
$user1 = 1;
$colspan = 1;
} elseif ( mosCountModules( ‘user2’ ) == 1 ) {
$user2 = 1;
$colspan = 1;
}
//right based combos
if ( mosCountModules( ‘right’ ) and ( empty( $_REQUEST[‘task’] ) || $_REQUEST[‘task’] != ‘edit’ ) ) {
$right = 1;
}
?>
<meta http-equiv=”Content-Type” content=”text/html; <?php echo _ISO; ?>” />
<link href=”<?php echo $mosConfig_live_site;?>/templates/blue_web_group/css/template_css.css” rel=”stylesheet” type=”text/css” />
<script type=”text/javascript” src=”<?php echo $mosConfig_live_site;?>/templates/blue_web_group/js/mootools.js”></script>
<script type=”text/javascript” src=”<?php echo $mosConfig_live_site;?>/templates/blue_web_group/js/site.js”></script>
<script type=”text/javascript” src=”<?php echo $mosConfig_live_site;?>/templates/blue_web_group/js/niftycube.js”></script>
<script type=”text/javascript”>
window.onload=function(){
Nifty(“div#contentround,div#nav,div#boxcontentleft,div#boxcentermain,div#boxcenteramain,div#boxcenterbmain”);
}
</script>
</head>
<body>
</body>
</html>
Within hours, jdam posted this…
Hi Denward,
Welcome sa community.
I assume nag embed ka within your template and you already uploaded head.swf within your blue_web_group directory.
You need to add conifg parameters on your flash generated codes.Try this script:
value=”<?php $mosConfig_live_site; ?>templates/blue_web_group/images/head.swf” />
src=”<?php $mosConfig_live_site; ?>templates/blue_web_group/images/head.swf”your just missing $mosConfig_live_site.
hope to hear from you,
-Jd
Filed under: Joomla!
hi,
i created a custom home page for joomla.
i developed it offline on my local machine and it was working ok.
when i uploaded it online at http://www.mousetricks.net/lookseye it was not displaying the flash movie.
please help me to determine what is wrong with my code,
the code is below:
AC_FL_RunContent( ‘codebase’,’http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,’700′,’height’,’350′,’title’,’flash’,’src’,’/templates/front_pager/images/look_flash’,’quality’,’high’,’pluginspage’,’http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,’movie’,’/templates/front_pager/images/look_flash’ ); //end AC code
<param name="movie" value="/templates/front_pager/images/look_flash.swf” />
<embed src="/templates/front_pager/images/look_flash.swf” quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” type=”application/x-shockwave-flash” width=”700″ height=”350″>
Can u plz tell how to change .jpg to .swf wordpress offline header?