Forums / Templates, Stylesheets, Page Layout / Problem with Flash Header

Problem with Flash Header

Locked

Started by nacidoporfe on 22 Sep 2006, 3:18 AM · Views: 95,615

Results 1 to 20 of 235
This thread is locked. New replies are disabled.
22 Sep 2006, 3:18 AM
#1
nacidoporfe avatar

nacidoporfe

New Zenner

Join Date:
Jun 2005
Posts:
17
Plugin Contributions:
0

Problem with Flash Header

Hi:
I wonder if someone can help me. I have changed my header logo into a flash on but the flash.swf doesn´t load. I mean, it seems that it loads but theres is no image and the page doesn´t finish loading.
When I roll the mouse over the flash image there is a message that says: "click to activate and use the control".
I don´t know what to do.

Please help me!!!

22 Sep 2006, 5:10 AM
#2
nacidoporfe avatar

nacidoporfe

New Zenner

Join Date:
Jun 2005
Posts:
17
Plugin Contributions:
0

Re: Problem with Flash Header

Maybe it could be important: I´m using 1.3.5 ZenCart version. How many files do I have to change in this version in order to change to a flas header?

22 Sep 2006, 5:19 AM
#3
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

Re: Problem with Flash Header

You are more than likely using IE to view your site and therefore you are caught in the problem with IE and Macromedia legal disputes.

See this post for information on getting flash to display properly in IE :
http://www.zen-cart.com/forum/showthread.php?t=34807&highlight=java+flash

When the world gets in my face I say Have A Nice Day.

22 Sep 2006, 5:55 AM
#4
nacidoporfe avatar

nacidoporfe

New Zenner

Join Date:
Jun 2005
Posts:
17
Plugin Contributions:
0

Re: Problem with Flash Header

Hi Tina, thanks a lot for answering me. I have some more questions. I understand that I have to create a javascript file but:

  1. I´m using a customized template, Do I have to create a directory name jscript" or I have to put the java script in Template_default/jscript?
  2. After de java script I have to write this :"<script src="includes/templates/blue_strip/jscript/paragone.js"></script>". Where do I write it? I mean; What subdirectory or file?

Thanks a lot for your time.

Hector

22 Sep 2006, 2:27 PM
#5
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

Re: Problem with Flash Header

You would want to place the javascript portion in the folder includes/templates/YOUR_TEMPLATE/javascript

The code to call it will go where you would normally put you <embed....... > code so in your case it would be in includes/templates/YOUR_TEMPLATE/common/tpl_header.php since you are using a flash header.

Hope that helps clarify it a little more for you !

When the world gets in my face I say Have A Nice Day.

22 Sep 2006, 8:08 PM
#6
nacidoporfe avatar

nacidoporfe

New Zenner

Join Date:
Jun 2005
Posts:
17
Plugin Contributions:
0

Re: Problem with Flash Header

Thanks again. It didnt work. Maybe there´s something I´m doing wrong buty I don´t know what.

Good luck!

Hector

23 Sep 2006, 2:33 AM
#7
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Problem with Flash Header

With refer to the other topic at Reviewer's Corner Shop has gone live: please review

Our fellow member JohneeMac suggested the following for the Flash.
SWFObject: Javascript Flash Player detection and embed script

I had tested, it works, with more functions and with XHTML validation.

And below are the steps of the test which use the JavaScript download from the above site.

  1. save the header Flash file to the following directory (just for example)
    includes/templates/YOUR_TEMPLATE/images/flash/YOUR_HEADER.swf

  2. download the zip packaged file from the above site

  3. unzip and save the included swfobject.js file (not compressed and about 6.5 KB) to your ZC template directory
    includes/templates/YOUR_TEMPLTE/jscript/swfobject.js

  4. If in before, the tpl_header.php had not been modified,
    then copy the following file:
    includes/templates/template_default/common/tpl_header.php

and save it to your template override directory:
include/templates/YOUR_TEMPALTE/common/tpl_header.php

  1. Open up the new saved tpl_header.php file in your override directory
    include/templates/YOUR_TEMPALTE/common/tpl_header.php

Add and modify the codes according to your requirements.
For detail usuages, please refer to the docs and the original site for more infos.

For example,
in the tpl_header.php, just insert the codes for Flash below the section of:

<!--bof-branding display--> <div id="logoWrapper">
<!--bof-branding display-->
<div id="logoWrapper">

<script type="text/javascript" src="includes/templates/YOUR_TEMPLATE/jscript/swfobject.js"></script>
<div id="flashcontent">
  This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("includes/templates/YOUR_TEMPLATE/images/flash/YOUR_HEADER.swf", "YOUR_HEADER", "750", "160", "7", "#000000");
   so.write("flashcontent");
</script>

Note:
In the above codes, where:
YOUR_TEMPLATE = the name of your template.
YOUR_HEADER = the file name of your Flash file.

.

A New Starter again

26 Sep 2006, 9:25 PM
#8
nacidoporfe avatar

nacidoporfe

New Zenner

Join Date:
Jun 2005
Posts:
17
Plugin Contributions:
0

Re: Problem with Flash Header

Thanks, I´ll try.

Good luck,
Hector

5 Oct 2006, 7:35 AM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,892
Plugin Contributions:
20

Re: Problem with Flash Header

Guess I screwed up correctly for a change!
My flash file works in IE but not FF> echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" height="150" width="750" id="Flash1">

    <param name="Movie" value="images/main.swf" />
    <param name="Quality" value="AutoLow" />
    <param name="Loop" value="1" />
    <param name="Play" value="1" />
    <param name="Scale" value="exactfit" />
    <param name="WMode" value="Window" />
    <param name="SAlign" value="l" />

</object>';Go figure!

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

17 Oct 2006, 11:17 AM
#10
neunetllc_com avatar

neunetllc_com

Banned

Join Date:
Oct 2006
Location:
New Albany Ohio
Posts:
113
Plugin Contributions:
0

Re: Problem with Flash Header

i've submitted a contribution that resolves this issue. if you can't wait for the review, you can download it at neunetllc.com.

from your link at deconcept, the primary issue with zen cart owners is usually the 2nd bullet point under 1) The default Macromedia provided embed.

requiring flash activation before using it will certainly drive potential customers away. however, i don't buy the detection issue because of the flash penetration rate, which is over 97%. most people know of adobe(macromedia) and the flash player and trust it.

the nnez solution reduces the [script] [noscript] object embed + click to activate issues with 1 php function call.

23 Oct 2006, 3:06 PM
#11
neunetllc_com avatar

neunetllc_com

Banned

Join Date:
Oct 2006
Location:
New Albany Ohio
Posts:
113
Plugin Contributions:
0

Re: Problem with Flash Header

nacidoporfe:

Hi:
I wonder if someone can help me. I have changed my header logo into a flash on but the flash.swf doesn´t load. I mean, it seems that it loads but theres is no image and the page doesn´t finish loading.
When I roll the mouse over the flash image there is a message that says: "click to activate and use the control".
I don´t know what to do.

Please help me!!!

did you get your problem resolved?

the first and more important symptom, that the page doesn't finish loading, is indicative of your site not finding the .swf file where it's pointed to.

the second symptom will be there whether the flash file loads or not, if you don't have the [script] embedded properly. i'm suprised by how many sites out there do not remedy the click to activate issue for their visitors (including major corporate sites that represent big $).

15 Dec 2006, 3:02 PM
#12
subb avatar

subb

New Zenner

Join Date:
Oct 2006
Posts:
26
Plugin Contributions:
0

Re: Problem with Flash Header

seethrou:

With refer to the other topic at Reviewer's Corner Shop has gone live: please review

Our fellow member JohneeMac suggested the following for the Flash.
SWFObject: Javascript Flash Player detection and embed script

I had tested, it works, with more functions and with XHTML validation.

And below are the steps of the test which use the JavaScript download from the above site.

  1. save the header Flash file to the following directory (just for example)
    includes/templates/YOUR_TEMPLATE/images/flash/YOUR_HEADER.swf

  2. download the zip packaged file from the above site

  3. unzip and save the included swfobject.js file (not compressed and about 6.5 KB) to your ZC template directory
    includes/templates/YOUR_TEMPLTE/jscript/swfobject.js

  4. If in before, the tpl_header.php had not been modified,
    then copy the following file:
    includes/templates/template_default/common/tpl_header.php

and save it to your template override directory:
include/templates/YOUR_TEMPALTE/common/tpl_header.php

  1. Open up the new saved tpl_header.php file in your override directory
    include/templates/YOUR_TEMPALTE/common/tpl_header.php

Add and modify the codes according to your requirements.
For detail usuages, please refer to the docs and the original site for more infos.

For example,
in the tpl_header.php, just insert the codes for Flash below the section of:

<!--bof-branding display--> <div id="logoWrapper">
<!--bof-branding display--> <div id="logoWrapper"> <script type="text/javascript" src="includes/templates/YOUR_TEMPLATE/jscript/swfobject.js"></script> <div id="flashcontent"> This text is replaced by the Flash movie. </div> <script type="text/javascript"> var so = new SWFObject("includes/templates/YOUR_TEMPLATE/images/flash/YOUR_HEADER.swf", "YOUR_HEADER", "750", "160", "7", "#000000"); so.write("flashcontent"); </script> ```Note: > In the above codes, where: > YOUR_TEMPLATE = the name of your template. > YOUR_HEADER = the file name of your Flash file. > > .

Hi, this is a fantastic hint, thank you for sharing it, but i can only get it to work for the header.

i have a couple of blank sideboxes (tpl_blank_sidebox.php - one for either side of the page) and have successfully added flash to them, but stumble on the 'click to activate' problem in IE. i tried using the above js workaround for them and it seems to move the sideboxes up to where the header was and remove the original header swf altogether, as if it were overwriting it.

now, i cant see any where in the code that specifically tells the flash to render, but it does seem to want to take the place of the header.swf

could it be that i need to duplicate the swfobject.js so there is a separate script for each position on the page?

any help would be gratefully received!

thanks all

15 Dec 2006, 11:58 PM
#13
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Problem with Flash Header

subb:

Hi, this is a fantastic hint, thank you for sharing it, but i can only get it to work for the header.
The example above was the demo for the header only. If need it to work in other areas and also the add on codes should be modified and inserted into the other related areas.

e.g. for the header and the code was inserted into the header file.

<script type="text/javascript" src="includes/templates/YOUR_TEMPLATE/jscript/swfobject.js"></script>
<div id="flashcontent">
  This text is replaced by the HEADER Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("includes/templates/YOUR_TEMPLATE/images/flash/YOUR_HEADER.swf", "YOUR_HEADER", "750", "160", "7", "#000000");
   so.write("flashcontent");
</script>

e.g. for sideboxes and it should be modified and figure out how to insert into the related sidexboxes files.

<script type="text/javascript" src="includes/templates/YOUR_TEMPLATE/jscript/swfobject.js"></script>
<div id="flashcontent">
  This text is replaced by the SIDEBOXES_X Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("includes/templates/YOUR_TEMPLATE/images/flash/YOUR_SIDEBOXES_X.swf", "YOUR_SIDEBOXES_X", "120", "150", "7", "#000000");
   so.write("flashcontent");
</script>

If have more than a few files and modifications in use, it may consider to use the idea of "include" functions to simplify or ease the jobs.
Please refer to the topic below for the idea.
using an include for a header
and more specify in post #6

subb:

i have a couple of blank sideboxes (tpl_blank_sidebox.php - one for either side of the page) and have successfully added flash to them, but stumble on the 'click to activate' problem in IE. i tried using the above js workaround for them and it seems to move the sideboxes up to where the header was and remove the original header swf altogether, as if it were overwriting it.

now, i cant see any where in the code that specifically tells the flash to render, but it does seem to want to take the place of the header.swf

could it be that i need to duplicate the swfobject.js so there is a separate script for each position on the page?

any help would be gratefully received!

thanks all

The swfobject.js should be reused without the duplication.

And the above is only for suggestion and have not been tested. And it may be used with some modifications for the concept is similar.

.

A New Starter again

16 Dec 2006, 2:45 PM
#14
subb avatar

subb

New Zenner

Join Date:
Oct 2006
Posts:
26
Plugin Contributions:
0

Re: Problem with Flash Header

thanks very much for the reply, i probably should have gone into a little more detail about the problem!

i have managed to add the appropriate script code to the correct sidebox, and now am seeing correct results in firefox, but now it seems that IE (the whole reason we have to do all this!) is putting the sidebox in the area that the header is usually sitting, and the header is missing.

take a look if it will help,

http://www.boutiqueuniquelondon.com/index.php

if you look in firefox you notice that everything is where it should be, but IE seems to make a meal of laying the page out.

i am using 'Blank Sidebox' from here

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_52&products_id=174

and the script i have added to it follows:

<script type="text/javascript" src="includes/templates/YOUR_TEMPLATE/jscript/swfobject.js"></script>
<div id="flashcontent">
  This text is replaced by the tpl_blllp_leftside Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("includes/templates/blllp/flash/left.swf", "tpl_blllp_leftside", "200", "400", "7", "#ffffff");
   so.write("flashcontent");
</script>

if you have any ideas of what may be wrong i would love to hear them.

much appreciated mate

16 Dec 2006, 3:38 PM
#15
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Problem with Flash Header

You have following duplicated div id variables in your page source

<div id="flashcontent">

At about:

  1. line no. 48
  2. line no. 90

Please try to modify and separate them for the related locations.
For example:

  1. line no. 48
<div id="flashcontent_01">
  1. line no. 90
<div id="flashcontent_02">

And please check your codes, there is a un-defined template name which refer to your page source at about line no. 89

   <script type="text/javascript" src="includes/templates/YOUR_TEMPLATE/jscript/swfobject.js"></script>

I have tried in my local test with your html source and it seems work under IE6.

Hope this helps. :smile:

Oops!

One more to notice:
The following should also be modified.
At about line no. 51

   so.write("flashcontent_01");

At about line no. 95

   so.write("flashcontent_02");

A New Starter again

16 Dec 2006, 5:34 PM
#16
subb avatar

subb

New Zenner

Join Date:
Oct 2006
Posts:
26
Plugin Contributions:
0

Re: Problem with Flash Header

seethrou, thank you so much.

all is working as it should now.

again, my sincerest thanks.

17 Dec 2006, 1:56 AM
#17
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Problem with Flash Header

You are welcome!
And glad to hear that it can be of help. :smile:

.

A New Starter again

17 Dec 2006, 3:11 PM
#18
subb avatar

subb

New Zenner

Join Date:
Oct 2006
Posts:
26
Plugin Contributions:
0

Re: Problem with Flash Header

oh dear, i really am sorry, but since i implemented those fixes i have had IE spitting an error message at me of which i have no idea to what it refers!

see below

has anyone ever come across this before in conjunction with the flash/javascript workaround (or indeed ever!)

please, do take a look at http://www.boutiqueuniquelondon.com/index.php and try clicking any link

again, any help gratefully recieved!

17 Dec 2006, 10:49 PM
#19
subb avatar

subb

New Zenner

Join Date:
Oct 2006
Posts:
26
Plugin Contributions:
0

Re: Problem with Flash Header

i have tracked the problem down to the fact that i have 3 separate flash movies on some pages at once. this seems to be causing the problem. if i switch any of the three swfs (header, left and right sideboxes) off then the error goes away, and likewise, the pages that only have 2 swfs on them have always worked as expected.

im assuming that IE is spitting out the 'Out of memory on line: 126' along with another stating 'Stack overflow at line: 130' because not enough memory is being allocated the the flash stuff at some point.

to be honest all i can do is guess right now, and because i know nothing about javascript i cant take a look at the swfobject.js to see if that somehow is assigning memory for the movies, and not giving up enough...

have i just reached a theoretical limit to the number of flash movies zen-cart can display in IE?

any help at all with this would be so very appreciated

17 Dec 2006, 11:21 PM
#20
subb avatar

subb

New Zenner

Join Date:
Oct 2006
Posts:
26
Plugin Contributions:
0

Re: Problem with Flash Header

result!

i finally worked out that IE doesnt like the javascript 'includes/templates/YOUR_TEMPLATE/jscript/swfobject.js' to be referenced more than a few times, otherwise it spits Out of memory and Stack overflow errors at you.

so in my case the answer was to leave the header as

<script type="text/javascript" src="includes/templates/blllp/jscript/swfobject.js"></script>
<div id="flashcontent">
  This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("includes/templates/blllp/flash/top.swf", "top.swf", "750", "150", "7", "#ff0000");
   so.write("flashcontent");
</script>  

but remove

<script type="text/javascript" src="includes/templates/blllp/jscript/swfobject.js"></script>

for every other instance of that script being called, so the sideboxes looked like this

<div id="flashcontent_left">
  This text is replaced by the tpl_blllp_leftside Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("includes/templates/blllp/flash/left.swf", "tpl_blllp_leftside", "200", "400", "7", "#ffffff");
   so.write("flashcontent_left");
</script>

hope this can help someone else some day!