Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / flash banner in the header

flash banner in the header

Locked

Views: 3,016

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
8 Feb 2010, 3:24 PM
#1
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

flash banner in the header

I know that there is a huge number of posts as to how to embed the flash banners but most of them (if not all) differ in the way they handle the subject to some extent and this is what makes me confused. In one of the earlier posts sillyboydarryl suggests the code below should be used and then he directs the lazy buddies to http://www.freddythunder.com/programs/codegen.php. The code generated here is different than what he suggests. I wonder if this makes any difference.

document.write('<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
document.write('WIDTH="300" HEIGHT="156" id="paragone" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="paragone.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#> <EMBED src="paragone.swf" loop=false menu=false quality=high bgcolor=# WIDTH="300" HEIGHT="156" NAME="paragone" ALIGN=""');
document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT>');

Secondly, I have no idea where to put this <script src src="includes/templates/blue_strip/jscript/paragone.js"></script>. I want to place the flash banner in the header so which files should I change - tpl_main or tpl_header? Is it possible to position the swf file in the header pixel by pixel? If yes how can I do that? Would anyone please be kind enough to let me know how to deal with all these matters, if possible, in a plain English?

8 Feb 2010, 3:36 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: flash banner in the header

I know that there is a huge number of posts as to how to embed the flash banners but most of them (if not all) differ in the way they handle the subject to some extent
Due to differences in code for a flash and/or a swif file
Looks like you have an Adobe flash file
Secondly, I have no idea where to put this ```

<script src src="includes/templates/blue_strip/jscript/paragone.js"></script>
Reade the js document in the dos folder - your js needs to be renamed from paragone.js to jscript_paragone.js and ZenCart will automatically load it correctly
> I want to place the flash banner in the header so which files should I change - tpl_main or tpl_header?
If you want it in the header then the tpl header file
> Is it possible to position the swf file in the header pixel by pixel? If yes how can I do that? 
Don't know what you are asking?
pixel by pixel????
8 Feb 2010, 6:56 PM
#3
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

Re: flash banner in the header

What i mean by pixel, how do I position the banner? I know there is an align property in the code but I just wanted to know that if margin thing used in css files would also work for a swf file to more accurately position it.

What code should I add to the tpl_header and after which line? I read the js document but it covers very little. Am I missing something?

8 Feb 2010, 11:09 PM
#4
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

Re: flash banner in the header

I am trying to place a flash banner in the header but I only see a white empty space where flash banner is meant to be. Could this be a firefox problem or I did something wrong? Can anyone help me on this? I have put the following code into the tpl_header file right after "<!--bof-branding display-->

<div id="logoWrapper">"

document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
document.write('WIDTH="550" HEIGHT="190" id="untitled" ALIGN="right">');
document.write('<PARAM NAME=movie VALUE="untitled.swf"> <PARAM NAME=loop VALUE=true> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000> <EMBED src="untitled.swf" loop=true menu=false quality=high bgcolor=#000 WIDTH="550" HEIGHT="190" NAME="untitled" ALIGN=""');
document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT>');

8 Feb 2010, 11:13 PM
#5
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: flash banner in the header

or I did something wrong
Make sure code path to swf file is exactly correct or you
will get white space..

8 Feb 2010, 11:40 PM
#6
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

Re: flash banner in the header

I don't remember putting a code for the path to the swf file, can you be more specific please?

8 Feb 2010, 11:42 PM
#7
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: flash banner in the header

bahokan:

I don't remember putting a code for the path to the swf file, can you be more specific please?
untitled.swf..make sure your code is directing to exact location
i.e folder, where swf file is housed

8 Feb 2010, 11:52 PM
#8
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

Re: flash banner in the header

I got this code automatically generated on a web site (see above). So apparently, it didn'put any code for the path. The swf file is housed in templates/my_template/images. How can I edit the js file so it includes the code for the path?

8 Feb 2010, 11:58 PM
#9
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: flash banner in the header

The swf file is housed in templates/my_template/images
Your code above does not reflect that...you don't alter the js file ..call to that js file is not in your code above...

9 Feb 2010, 12:06 AM
#10
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

Re: flash banner in the header

In some other posts, I've seen the code below. Do I need to use something like that, if yes, can u just let me know how?

<script src="includes/templates/my_template/jscript/untitled.js"></script>
9 Feb 2010, 12:24 AM
#11
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

Re: flash banner in the header

Anyone out there to let me know how to link the js file to the swf file? Please..

10 Feb 2010, 11:39 AM
#13
bahokan avatar

bahokan

New Zenner

Join Date:
Feb 2010
Posts:
8
Plugin Contributions:
0

Re: flash banner in the header

I added the code below to tpl_header.php right under <div id="logoWrapper">. swfobject.js was also put
in the folder jscript in mytemplate folder. But it didn't work, all I saw was an empty pink area.

<script type="text/javascript" src="includes/templates/mytemplate/jscript/swfobject.js"></script> <div id="flashcontent"> <center> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="untitled" width="550" height="190" ALIGN="right"> <param name="movie" value="logo.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFCCCC"> <embed name="logo" src="logo.swf" quality="high" bgcolor="#FFCCCC" width="550" height="190" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed> </object> </center> <script type="text/javascript"> var so = new SWFObject("includes/templates/mytemplate/images/logo.swf", "logo", "550", "190", "7", "#FFCCCC"); so.write("flashcontent"); </script> </div>

Then I changed the code to the below one and it surprisingly worked :blink:. Besides, I haven't put any code into the jscript folder.

<object type="application/x-shockwave-flash" data="includes/templates/mytemplate/images/logo.swf" width="550" height="190" align="right"> <param name="movie" value="includes/templates/mytemplate/images/logo.swf" /> <param name="quality" value="high"><param name="BGCOLOR" value="#000000"> <param name="menu" value="false"> </object>

Is something wrong with the first one or is it kinda depreciated? Also, if I want this flash to appear
in the header of the home page only, what would you suggest I do?

10 Feb 2010, 1:05 PM
#14
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: flash banner in the header

Is something wrong with the first one
yes. coding...logo.swf..3 entries in that code,
path to swf file incorrect on 2 of those entries

10 Feb 2010, 2:01 PM
#15
acummins avatar

acummins

New Zenner

Join Date:
Jun 2008
Posts:
63
Plugin Contributions:
0

Re: flash banner in the header

I have a similar problem and getting tired of it..

1 May 2010, 12:36 PM
#16
pure_chemistry avatar

pure_chemistry

New Zenner

Join Date:
May 2010
Posts:
1
Plugin Contributions:
0

Re: flash banner in the header

Hi,

My flash banner in header is working; I have used the following instructions:

  1. Download the file tpl_header.php from /includes/templates/template_default/common

  2. Open the file with dreamweaver (use your favorite)

  3. Add this code between line 71 and 77 ( In this case)

<object height="300" width="100%" data="http://www.AAAAAAAAA.com/includes/templates/template_default/images/AAA.swf" type="application/x-shockwave-flash">

<param value="includes/templates/template_default/images/AAA.swf" name="movie" /> <param value="high" name="quality" /><param value="#FFFFFF" name="BGCOLOR" /> <param value="false" name="menu" /> </object>

Note:AAAAAAAAA.com, must be replaced by the name of your page; AAA.swf must be replaced by your flash file.

  1. Save the file and upload it to : /includes/templates/template_default/common

It works for me, I hope works for you too.

:yes: