How to insert flash file banner (.swf) into header
Vanka - February 21, 2009 - 09:20
HI,
I am able insert flash file banner into content with the aid of FCKeditor (flash tab). Has anybody experiences with inserting flash banner into Header? It is possible through any flash module?
Thanks

hi use this code
hi use this code for display .swf file in your header in your page.tpl.php
<div id="head">
<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/filename.swf" />
<param name="quality" value="high" />
<embed src="themes/your theme name/images/filename.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="786" height="147"></embed>
</object>
</div>
Thanks & Regards
Piyush Sharma
http://www.piyushsharma7331.com
Thanks Mr.Sumitshekhawat7331,
Thanks Mr.Sumitshekhawat7331, works perfectly!
Different flash baner on Front and different on another pages
Thanks Mr.Sumitshekhawat7331, your recommended code for inserting flash banner into header works perfectly!
Hi, ones more please,
how can I insert different flash banner on Frontage and different flash banner on another pages?
Thanks
hi just use this code for this
hi use this code it will solve your problem
<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>
Thanks & Regards
Piyush Sharma
Thanks & Regards
Piyush Sharma
http://www.piyushsharma7331.com
Flash banner overlap submenu
Thanks Mr.Sumitshekhawat7331 for your goodwill and professionalism which exceeds the finance crises. The code works perfectly! I am sending you the ocean of banner’s roses!
For the third time I have the last question, but probably the most difficult. The flash banner inbuilded in header overlap the submenu – dropdown menu (I am using nice menu module, gently modified theme garland).
Firstly I tried to solve the problem with the aid of z-index (nice menu, header region) – no success. Secondly with the aid of animation gif file, but the resolutions by gif animation is too poor (web216 palette colour) and size too large (800kb).
If you have the knowledge of this problem and are you able to leak it, I will not be bad till the end of my life.
Thanks
hi vanka
try this code it will solve your problem
<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="wmode" value="opaque" value="themes/your theme name/images/filename.swf" />
<param name="quality" value="high" />
<embed src="themes/your theme name/images/filename.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="786" height="147"></embed>
</object>
code change in line 4 name="wmode" value="opaque"
and tell me whether your problem will solve or not
thanks & regards
Thanks & Regards
Piyush Sharma
http://www.piyushsharma7331.com
Hi, I was trying to add a
Hi,
I was trying to add a flash header to my page.tpl.php file using your method. But I still get a nasty error report, saying " Parse error: syntax error, unexpected '<' in C:\wamp\www\client1\sites\all\themes\custom\arts\page.tpl.php on line 39 "
here is my code
<?phpif(drupal_is_front_page())
{
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0"
width="620" height="175"
>
<param name="movie" value="themes/custom/arts/images/header.swf">
<param name="quality" value="high">
<embed
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
width="620" height="175"
src="themes/custom/arts/images/header.swf"
quality="high"
>
</embed>
</object>
}
else
{
<img src="themes/custom/arts/images/floater.jpg" />
}
?>
Please, how can I sort this out.
swf code within page.tpl.php
Hi sumitshekhawat7331,
I tried to apply the same principle though applying the code you provided to a top banner rather then a header. A box was inserted in the right area though it remains white instead of displaying the actual swf banner. Do you have any idea how i could amend this? Here is the code I inserted:
<div class="bg-top">
<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="620" height="201">
<param name="movie" value="images/bg-top.swf" />
<param name="quality" value="high" />
<embed src="images/bg-top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="620" height="201"></embed>
</object>
</div>
hi use this code
hi just use this code
<div class="bg-top">
<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="620" height="201">
<param name="movie" value="themes/yourthemename/images/bg-top.swf" />
<param name="quality" value="high" />
<embed src="images/bg-top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="620" height="201"></embed>
</object>
</div>
you have to correct this line
<param name="movie" value="themes/yourthemename/images/bg-top.swf" />thanks & regards
Thanks & Regards
Piyush Sharma
http://www.piyushsharma7331.com
Thanks sumitshekhawat7331. It
Thanks sumitshekhawat7331. It now works perfectly, you're a star!!!
hi tacha
hi tacha..thanks for the complement but i am not a star...i am just a drupal learner if you need any help further then you can mail me at piyushsharma7331 at yahoo dot com
thanks & regards
Thanks & Regards
Piyush Sharma
http://www.piyushsharma7331.com
flash file with as2 and xml
hi dude, Your instructions are great. but it somehow did not solve my problem. I mean, code is working in ie - maxthon but not in chrome or firefox. I think that my code is actionscript 2.0 and xml. and it populate data from xml and gets images from a folder according to xml. I have different flashes in my web site all works only this hell does not work. If you have any idea please tell me. Thanks
hello
hi dear
could you send me your email id so that we can talk through email.
whatever you said , i want to tell you that, in my site
http://xbox360preview.co.uk
flash banner displaying images using XML.
In this site i have done this thing
php file generate an XML file which will called by flash banner and display output
do you want do the same thing ?.
Thanks & Regards
Piyush Sharma
http://www.piyushsharma7331.com
Hi sumitshekhawat7331, I have
Hi sumitshekhawat7331, I have been reading your advice and try to do the code as well. I seem to get a black box of where it is supposed to be. My flash functions with an xml file as well. The flash movie uses an xml to find the images of what needs to be added to the flash and then flash plays through those images. I am able to go directly to the flash movie i have uploaded to the site but i cannot integrate it into the banner that I would like. If you could please help me on this, I would greatly appreicate it. Thank you
hi torn35 do this, it will solve your problem
visit this site
http://www.xbox360preview.co.uk/
i have used these codes....
flash file ...
if (_root.XMLfile == undefined || _root.XMLfile == "")
{
_root.XMLfile = "http://www.xbox360preview.co.uk/myphpfilename.php";
}
now code for myphpfilename.php which is called by flash file
which will generate an XML file output
<?phpheader('Content-Type: text/xml');
$strHostName =
$strDirectory = "slides";
echo(<?xml version="1.0" encoding="UTF-8"?>');
echo("\r\n");
echo('<images>');
echo("\r\n");
if ($handle = opendir($strDirectory)) {
// List all the files
while (false !== ($file = readdir($handle))){
if($file == "." || $file == ".."){
continue;
}
echo '<image><url>slides/'.$file.'</url></image>'."\r\n";
}
closedir($handle);
}
echo('</images>');
?>
and create a folder named slides and upload all your images it it, otherwise send me your site url and your flash(.fla) file i will configure it.
Thanks & Regards
piyush
Thanks & Regards
Piyush Sharma
http://www.piyushsharma7331.com
thank you for your code. I
thank you for your code. I have used it and it works great in firefox but I am having issues with IE... any way you can help?
www.atmautos.com
This is what my code looks like in the page.tpl.php
<div id="main">
<?php if ($section1count > 0): ?>
<?php if ($breadcrumb): ?><div id="breadcrumb2"><?php print $breadcrumb; ?></div><?php endif; ?>
<?php endif; ?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="750" height="175">
<param name="movie" value="sites/all/themes/salamanderskins/images/atm.swf" />
<param name="quality" value="high" />
<embed src="sites/all/themes/salamanderskins/images/atm.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="175"></embed>
</object>
<?php if ($content_top):?><div id="content-top"><?php print $content_top; ?></div><?php endif; ?>
<h1 class="title"><?php print $title ?></h1>
<div class="tabs"><?php print $tabs ?></div>
<?php print $help ?>
<?php if ($show_messages) { print $messages; } ?>
<?php print $content; ?>
<?php print $feed_icons; ?>
<?php if ($content_bottom): ?><div id="content-bottom"><?php print $content_bottom; ?></div><?php endif; ?>
</div>
work only on front page
I put this code on my site but it only work on frontpage.
<center>
<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="468" height="60">
<param name="movie" value="themes/sky/images/balkanium468x60.swf" />
<param name="quality" value="high" />
<embed src="themes/sky/images/balkanium468x60.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60"></embed>
</object></center>
On other pages I see only blank background.
Trebinje
Dnevni horoskop
Vjencanja
swf code within page.tpl.php
I am using very similar code but my text editor suggests there is something missing and I am getting parse error also:
<?php
if(drupal_is_front_page())
{
<object type="application/x-shockwave-flash"
data="http://www.website.co.nz/sites/all/themes/mytheme/imageFade.swf"
width="960" height="200">
<param name="movie" value="http://www.website.co.nz/sites/all/themes/mytheme/imageFade.swf" />
</object>
}
else
{
<img src="http://www.website.co.nz/sites/all/themes/mytheme/images/img3.jpg" />
}
?>