-
Re: Problem with Flash Header
Code:
<script type="text/javascript" src="includes/templates/arch_shoppe/jscript/swfobject.js"></script>
<div id="flashcontent">
ERROR ABOVE .. DUPLICATED CODE
<script type="text/javascript" src="includes/templates/arch_shoppe/jscript/swfobject.js"></script>
<div id="flashcontent">
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
id="photo_tutorial.swf" width="600" height="450">
<param name="movie" value="photo_tutorial.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#FFCCCC">
<embed name="/gallery3/photo_tutorial.swf" src="photo_tutorial.swf" quality="high" bgcolor="#FFCCCC"
width="600" height="450"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash">
</embed>
</object>
</center>
<script type="text/javascript">
var so = new SWFObject("includes/templates/arch_shoppe/jscript/swfobject.js", "photo_tutorial.swf", "600", "450", "7", "#FFCCCC");
so.write("flashcontent");
</script>
INCORRECT
Code:
<embed name="/gallery3/photo_tutorial.swf" src="photo_tutorial.swf" quality="high" bgcolor="#FFCCCC"
Should be
Code:
<embed name="photo_tutorial" src="photo_tutorial.swf" quality="high" bgcolor="#FFCCCC"
Actual swf file should be in includes/templates/arch_shoppe/
Have to go offline now as reside in UK..will check this thread when return..
-
Re: Problem with Flash Header
NOTE>>>
Code:
id="photo_tutorial.swf"
is also incorrect.. should be
Code:
id="photo_tutorial"
-
Re: Problem with Flash Header
I just cant get it this is driving me insane...I have changed the directory to "includes/templates/arch_shoppe/flash/photo_tutorial.swf
Code:
<script type="text/javascript" src="includes/templates/arch_shoppe/jscript/swfobject.js"></script>
<div id="flashcontent">
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
id="photo_tutorial" width="600" height="450">
<param name="movie" value="/flash/photo_tutorial.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#FFCCCC">
<embed name="photo_tutorial" src="/flash/photo_tutorial.swf" quality="high" bgcolor="#FFCCCC"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash">
</embed>
</object>
</center>
<script type="text/javascript">
var so = new SWFObject("includes/templates/arch_shoppe/jscript/swfobject.js", "photo_tutorial.swf", "600", "450", "7", "#FFCCCC");
so.write("flashcontent");
</script>
Not doing ANYTHING
-
Re: Problem with Flash Header
TRY CODE BELOW
Code:
<script type="text/javascript" src="includes/templates/arch_shoppe/jscript/swfobject.js"></script>
<div id="flashcontent">
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/...ersion=4,0,0,0"
id="photo_tutorial" width="600" height="450">
<param name="movie" value="photo_tutorial.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#FFCCCC">
<embed name="photo_tutorial.swf" src="photo_tutorial.swf" quality="high" bgcolor="#FFCCCC"
width="600" height="450"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash">
</embed>
</object>
</center>
<script type="text/javascript">
var so = new SWFObject("includes/templates/arch_shoppe/photo_tutorial.swf", "600", "450", "7", "#FFCCCC");
so.write("flashcontent");
</script>
MAKE SURE SWF file is in
includes/templates/arch_shoppe/photo_tutorial.swf
If this does not work, then please contact me via PM.. you will need to send
me actual swf file, via email, so can test myself.
Will recheck this thread when return online tomorrow.
-
Re: Problem with Flash Header
I have even tried other random codes and still nothing. I have the complete flash folder in /flash. The pictures, thembnails .as and everything. I dont understand why it isnt working correctly. It works if i go to the swf from the url. It makes no sense. Can anyone help out. My random code which i just tried and still had no sucess...
Code:
<script type="text/javascript" src="includes/templates/arch_shoppe/jscript/swfobject.js"></script>
<object type="application/x-shockwave-flash" data="includes/templates/arch_shoppe/flash/photo_tutorial.swf" width="600" height="400">
<param name="movie" value="includes/templates/arch_shoppe/flash/photo_tutorial.swf" />
<img src="includes/templates/arch_shoppe/images/header.jpg" border="0" width="600" height="400" ISMAP USEMAP="#headermap"/></object>
<map id ="headermap"
name="headermap">
<area shape="poly" coords="48,6,39,31,122,31,131,6" href="index.php" title="" />
<area shape="poly" coords="138,6,129,31,213,31,222,5,138,5" href="index.php?main_page=page&id=3&chapter=0" title="" />
<area shape="poly" coords="228,5,312,5,302,33,218,33" href="index.php?main_page=page&id=4&chapter=0" title="" />
<area shape="poly" coords="318,5,402,5,392,32,308,32" href="index.php?main_page=page&id=20&chapter=0" title="" />
<area shape="poly" coords="407,5,493,5,482,32,398,32" href="index.php?main_page=page&id=7&chapter=0" title="" />
<area shape="poly" coords="497,6,581,6,571,32,488,32" href="index.php?main_page=page&id=13&chapter=0" title="" />
<area shape="poly" coords="587,5,673,5,662,33,578,33" href="index.php?main_page=contact_us" title="" />
<area shape="poly" coords="679,6,761,6,751,32,668,32" href="index.php?main_page=login&zenid=e1cdb7491df4 ***193c7f9c6f3fcbd" title="" />
</map>
-
Re: Problem with Flash Header
Looked at this problem again
http://www.wpc-consulting.com/~stxmi...o_tutorial.swf
There are small images attached to this swf file, stored in your folder
/gallery3
It may be that these smaller images also need to be in your template
folder, but as stated before, without complete swf and everything
that it consists of, cannot test further.
-
Re: Problem with Flash Header
Welchyboy..
After receiving necessary files from you, via email, have
successfully integrated your flash gallery into demo zencart site, using ezpages...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How to:
All files received are extracted from folder, gallery3,
..except the swfobject.js file, which remains in current template
js folder.
gallery3 folder.. on extraction, keep remaining folder/s structures intact,
and they go into main zencart folder, where your index.php is stored
Upload to where stated above, via ftp
That's it.. will send you, via email, code to enter into your new ezpage.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo site, tested in IE6, IE7, Firefox and Safari
at
http://www.dezinashop.com/demo/index...age=page&id=20
:clap:
-
Re: Problem with Flash Header
BEAUTIFUL!!! So the key was to have it in the MAIN directory of the site. Got it. Thanks for taking the time out to help out i know you spend valuable time on it and i honestly appreciate it. Works great on all the computers i have tested.
-
Re: Problem with Flash Header
Quote:
So the key was to have it in the MAIN directory of the site
Up to a point, yes, except js file..Bear in mind that this method may NOT work
on all zencart flash integration using ezpages..plus code entered into ezpage must
be spot on re paths etc....
Also depends on flash file and any other folders/files associated with that file.
:smartalec:
-
Re: Problem with Flash Header
Thanks to this thread I now have a flash header!!
Thanks Everyone!
-
Re: Problem with Flash Header
Quote:
Originally Posted by
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
5. 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">
PHP Code:
<!--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 ,
I was wondering if someone could please help.
I have used above instructions and my flash DOES WORK. However it has a black background to it. How can I change it to white?
Many thanks for the code above.
-
Re: Problem with Flash Header
In the php code, look for #000000 and change it to suit your needs.
-
Re: Problem with Flash Header
Would you believe that I am having several problems running my flash test_1.swf file on my main page? I have read everything I can get my eyes on and I still am having several problems. I wish some brilliant person would help out.
Now for the setup in ZC 1.3.8a (Series_12_Horses is my new template):
1) I first downloaded swfobject.js (version 2.1) and placed the file in includes/templates/Series_12_Horses/jscript/swfobject.js
2) I originally added this code in define_main_page.php found in includes/languages/english/html_includes\Series_12_Horses\define_main_page.php
PHP Code:
<!--top of flash display-->
<script type="text/javascript" src="includes/templates/Series_12_Horses/jscript/swfobject.js"></script>
<div id="flashcontent">
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/...ersion=4,0,0,0"
id="test_1" width="600" height="240">
<param name="movie" value="includes/Series_12_Horses/flash/test_1.swf">
<!-- <param name="movie" value="test_1.swf"> -->
<param name="quality" value="high">
<param name="bgcolor" value="#FFCCCC">
<embed name="test_1" src="test_1.swf" quality="high" bgcolor="#FFCCCC"
width="600" height="240"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash">
</embed>
</object>
</center>
<script type="text/javascript">
var so = new SWFObject("includes/Series_12_Horses/flash/test_1.swf", "test_1", "600", "240", "7", "#FFCCCC");
so.write("flashcontent");
</script>
</div>
<!--bottom of flash display-->
However, the directory where the flash file was located (includes/Series_12_Horses/flash/test_1.swf) could not be found by the code, so I placed test_1.swf in the root directory and test_1.swf was found. (I removed (includes/Series_12_Horses/flash/) in the two code locations above to make the code work).
My problems are
1) I see an error in FireFox - SWFobject is not defined (my line 106 in define_main_page.php which is
PHP Code:
var so = new SWFObject("test_1.swf", "test_1", "600", "240", "7", "#FFCCCC");
2. Test_1.swf does not loop. I was under the impression the loop=yes was the default.
3. I do not like to be forced to put my swf file in the rood directory. How do we fix this? I assume that fixing the SWFobject error may correct this problem.
Oh, no errors seen in IE, but no looping.
Just a FYI if you are wondering about the test_1.swf. It was not published using Adobe. It was published from a test fla file I made in Pinnacle Studio 12 using Moeya Flash Video Pro demo version. (I do not do this for profit so I can not afford Adobe.
Any Ideas? I opened my site for any testing that you may want to do. - Thanks
-
Re: Problem with Flash Header
Quote:
Originally Posted by
dbltoe
In the php code, look for #000000 and change it to suit your needs.
Thanks dbttoe. That was it
-
Re: Problem with Flash Header
I think I do not know how to load SWFOBJECT.js correctly. What I mean is that I downloaded swfobject.js from http://code.google.com/p/swfobject/d...label:Featured
as swfobject_2_1.zip
I then extracted swfobject.js from the zip. It was not sure what the other files in the zip were or how to run them.
I believe I may have done this incorrectly.
Does anyone know the correct procedure?
-
Re: Problem with Flash Header
Line of code incorrect
i.e.
Code:
id="test_1" width="600" height="240">
should be
Code:
id="test_1.swf" width="600" height="240">
-
Re: Problem with Flash Header
Quote:
Originally Posted by
Sawhorse
I think I do not know how to load SWFOBJECT.js correctly. What I mean is that I downloaded swfobject.js from
http://code.google.com/p/swfobject/d...label:Featured
as swfobject_2_1.zip
I then extracted swfobject.js from the zip. It was not sure what the other files in the zip were or how to run them.
I believe I may have done this incorrectly.
Does anyone know the correct procedure?
You'll only need 'SWFOBJECT.js ' file
-
Re: Problem with Flash Header
Quote:
Originally Posted by
Sawhorse
I think I do not know how to load SWFOBJECT.js correctly. What I mean is that I downloaded swfobject.js from
http://code.google.com/p/swfobject/d...label:Featured
as swfobject_2_1.zip
I then extracted swfobject.js from the zip. It was not sure what the other files in the zip were or how to run them.
I believe I may have done this incorrectly.
Does anyone know the correct procedure?
http://www.zen-cart.com/forum/showpo...10&postcount=7
Correct details/actual swfobject file given at previous thread,
url above, but as mentioned in my last post, you have incorrect line
of code...
:smile:
-
Re: Problem with Flash Header
Quote:
Originally Posted by
misty
Line of code incorrect
i.e.
Code:
id="test_1" width="600" height="240">
should be
Code:
id="test_1.swf" width="600" height="240">
Thank your Misty, however I am confused. In your post http://www.zen-cart.com/forum/showpo...8&postcount=51 you do not show the swf extension. Maybe I am missing something.
I did try your suggestion changing ID=test_1 to ID=test_1.swf - However, it did not change the error noted in Firefox.
What am I doing incorrectly?
-
Re: Problem with Flash Header
Ovas & Misty, Your statements are exactly what I thought was correct until I looked at all the files of the ZIP file. There are two swfobject.js files. A long complicated js file (the one that I used) that looks appropriate. The another swfobject.js file showes only a single line of code, however the codes seems to include all that was in the first swfobject.js file. Strange.
-
Re: Problem with Flash Header
I have found a solution to my error in FireFox. I believe my error is due to the fact that I an using swfobject.js version 2.1 and not one of the older versions. If you look on http://code.google.com/p/swfobject/wiki/api you will see new code. Below is some of the SWFObject JavaScript API documentation found on that page. They indicate that "SWFObject 2 contains an API that allows JavaScript developers to reuse SWFObject's internal functions and aims to deliver a complete tool set for publishing SWF's and retrieving Flash player related information."
They say the following:
Don't specify the following attributes:
classid:"D27CDB6E-AE6D-11cf-96B8-444553540000" (SWFObject publishes this automatically for Internet Explorer on Windows)
type:"application/x-shockwave-flash" (SWFObject publishes this automatically for all browsers except Internet Explorer on Windows)
codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" (deprecated)
Don't specify the following param element:
movie (use the object element's data attribute instead, SWFObject publishes this automatically for Internet Explorer on Windows)
A basic example:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject - low level dynamic publishing example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("6.0.0")) {
var fn = function() {
var att = { data:"test.swf", width:"780", height:"400" };
var par = { flashvars:"foo=bar" };
var id = "replaceMe";
var myObject = swfobject.createSWF(att, par, id);
};
swfobject.addDomLoadEvent(fn);
}
</script>
</head>
<body>
<div id="replaceMe">Alternative content</div>
</body>
</html>
I modified the above code example (changed path & swf file name that I used in my previous postings) and it worked very well. No errors in FireFox. And the path was found.
The only question I have is how to get the swf to loop. When I find out I will post.
I hope the above has been helpful.
-
Re: Problem with Flash Header
Just to finish this up. The question I had about looping the swf has nothing to do with the code above. I can now loop with the best of them. To loop or not to loop is in the construction of the swf file.
-
Re: Problem with Flash Header
Pleased to hear finally working correctly.
:clap:
-
Re: Problem with Flash Header
I am also very happy (and a bit tired trying to get this to process correctly).
A note of thanks to everyone who watches and contributes to these threads. Zen Cart would not be as successful and responsive to each of our needs without your help. It would be very, very difficult for the Zen masters to respond to all (and there are a lot of us) of our needs. Again, thank you.
-
Re: Problem with Flash Header
hi all i will write a tutorial on how to use flash or swish and embbed it into zencart. witch also gets variables from Zen cart so i can have a working login and logout button with changing status and can get other variables into flash like shopping cart and prices... also it will be SEO friendly...
please let me know if you would be interested. i installed flash headers succesful in 2 shopping carts that i made... check it out
www.pong360.com/store
http://www.evadisplays.com/store/ind...adisplays_2008
best wishes,
Anton
p.s. let me know if you have any questions.
-
Re: Problem with Flash Header
I believe that a good Tutorial, FAQ or addition to Wiki (Using Flash) would be beneficial to all. I believe that this information needs to be very specific, include examples and be complete in and of itself. Of course, links are to be provided, but the discussion need to be self contained, and timely. (I say this because, as I found, PHP code will very based on the JavaScript being used to execute the process.) In the discussion you may want to include:
- A discussion about why one would/would not use flash.
- A discussion about why one would/would not use audio with flash.
- A simple discussion as to various ways to use flash.
- A small discussion about the difference between FLA and SWF files.
- A discussion about various programs that one could use to convert various video files, say avi, mpg, wmv etc. to swf would be good.
- A discussion of typical problems and their solutions
- A discussion of best practices
I am sure that the forum would be able to add, advise, and enhance any material provided so that the final product would be accessible to the most people.
Good luck in your endeavor.
-
Re: Problem with Flash Header
-
Re: Problem with Flash Header
I was wondering if there is a simple way to make the flash header change with resolution sizes?
This is my flash banner code. I have the width set to 100% however I have the actually flash file at like 1700 pixles because it will work whenever thre resolution is much higher. The problem is it is hard to make a flash banner because it is such a huge width.
Code:
<div><script type="text/javascript" src="includes/templates/arch_shoppe/jscipt/swfobject.js"></script>
<div id="flashcontent">
<center>
<embed
src="stxbanner.swf"
width=100%
height="110"
allowscriptaccess="always"
allowfullscreen="true"
/>
Here is the code for my image which replaces the flash banner on the other pages
Code:
<html>
<body>
<?php
echo '<img src="images/Stxbanner image header.jpg" width=100% height=100% border="0" />';
?>
</body>
</html>
Please let me know if there is anything I can do to get this working for other resolutions.
-
Re: Problem with Flash Header
I can make Flash work on either IE7 or Fire Fox but not both :(
I got flash to work on FireFox with the HTML insert, but not on IE7, I swiched it to pull up the jscript now it work in IE7 but not on FireFox???
Please Help!
-
Re: Problem with Flash Header
Hi 1fghjkl,
I am not a programer. However, I do know that my post 121 will work for both IE7 and Firefox 2. This may not help resolve your code problem, but it may give you a different path that will work.
Good luck.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
I was wondering if there is a simple way to make the flash header change with resolution sizes?
This is my flash banner code. I have the width set to 100% however I have the actually flash file at like 1700 pixles because it will work whenever thre resolution is much higher. The problem is it is hard to make a flash banner because it is such a huge width.
Code:
<div><script type="text/javascript" src="includes/templates/arch_shoppe/jscipt/swfobject.js"></script>
<div id="flashcontent">
<center>
<embed
src="stxbanner.swf"
width=100%
height="110"
allowscriptaccess="always"
allowfullscreen="true"
/>
Here is the code for my image which replaces the flash banner on the other pages
Code:
<html>
<body>
<?php
echo '<img src="images/Stxbanner image header.jpg" width=100% height=100% border="0" />';
?>
</body>
</html>
Please let me know if there is anything I can do to get this working for other resolutions.
You'll have better luck using swfObject 2.0.. Set swfObject to load with any other scripts you have... Place it in your javascapt folder and rename it to jscript_swfobject.js
Now use something like this where ever you want it to work..
Code:
<script type="text/javascript">
swfobject.embedSWF("flash/newsletter.swf", "myContent", "140", "100", "8.0.0");
</script>
<div id="myContent"><img src="images/newsletter.gif" hight="100" width="140"/></div>
This is how my newsletter swf works.. To make the size dynamic, you'll need to use some browser sniffer code.
1fghjkl: In a nutshell, IE reads the Object tag for swf files and FF reads the Embed tag... the above swfObject code works on both types of browsers.
Sawhorse: If your looking for Flash tutorials and such, flashkit.com is good I get allot of ideas from them.
-
Re: Problem with Flash Header
Thank you Davewest & Sawhorse for responding:) Unfortunately I still can't get it working.
I tried this script and I get a blank flash box in IE and nothing shows up in FireFox-
<script type="text/javascript">
swfobject.embedSWF("fitness_mega_flash.swf", "fitness_mega_flash.swf", "430", "390", "7.0.0");
</script>
<div id="myContent"><img src="images/large/fitness_mega_flash.swf" hight="430" width="390"/></div>
When I Try loading off of swobject.js all I get is "This Text is replaced by Flash movie" in both IE and FireFox. The good news is at least it's doing the same thing in both
<script type="text/javascript" src="includes/templates/template_default/jscript/swfobject.js"></script>
<div id="fitness_mega_flash.swf">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("images/large/fitness_mega_flash.swf", "fitness_mega_flash", "430", "390", "7", "#000000");
so.write("flashcontent");
</script>
Thanks in advance for the help-
-
Re: Problem with Flash Header
Not sure why JS code would be used over just using the OBJECT tag, but sometimes to help clear up problems you should use a full URL for the ".swf" file. Flash has built-in security and if using a relative link without a 'crossdomain.xml' file, you can run into problems.
Also and to my knowledge, only Safari requires the EMBED tag. Although first invented by Netscape the EMBED tag was never picked up as a Standard. The OBJECT tag was and works just fine for all Browsers but Safari. You can see an example used with the Wimpy Player, which is only using the OBJECT tag. So Safari users beware. :wink:
-
Re: Problem with Flash Header
Quote:
Originally Posted by
1fghjkl
<script type="text/javascript">
swfobject.embedSWF("fitness_mega_flash.swf", "fitness_mega_flash.swf", "430", "390", "7.0.0");
</script>
<div id="myContent"><img src="images/large/fitness_mega_flash.swf" hight="430" width="390"/></div>
If the above is what you have, then you have to many swf's. It's different depending on version of swfObject, but assuming you're using version 2.0. The code follows (FILE, LOCATION, HIGHT, WIDTH, FLASH VERSION, PARAMS)
Your code should read..
Code:
<script type="text/javascript">
swfobject.embedSWF("fitness_mega_flash.swf", "myContent", "430", "390", "7.0.0");
</script>
<div id="myContent"><p>Anything you want here</p></div>
The alternate content 'Anything you want here' only shows when scripting is turned off. Also I'm assuming your swf is in the root and not in a folder some where.
-
Re: Problem with Flash Header
I got the code to work this is what I have
Code:
<div id="flashcontent">
<strong>You need to upgrade your Flash Player in order to see the animated menu.
<a href="http://www.adobe.com/go/getflashplayer" target="_blank">www.Adobe.com</a>
</strong>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("example.swf", "example", "100%", "110", "6", "#ffffff");
so.write("flashcontent");
// ]]>
</script>
However it appears that I still have to make the flash very wide did i do something wrong? I added the java file but i am not sure it is referencing it right or something.
This is my java file
Code:
/**
* SWFObject v1.4.4: Flash Player detection and embed -http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
* *http://www.opensource.org/licenses/mit-license.php
*
* **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
* legal reasons.
*/
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
I got the code to work this is what I have
Code:
<div id="flashcontent">
<strong>You need to upgrade your Flash Player in order to see the animated menu.
<a href="http://www.adobe.com/go/getflashplayer" target="_blank">www.Adobe.com</a>
</strong>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("example.swf", "example", "100%", "110", "6", "#ffffff");
so.write("flashcontent");
// ]]>
</script>
However it appears that I still have to make the flash very wide did i do something wrong? I added the java file but i am not sure it is referencing it right or something.
This is my java file
Should upgrade to 2.0, 1.4 had issues with more then one movie on a page. also had conflicts with other mods. Try it without the %. It needs the size and not a percentage. Flash movies should be able to expand without having to enlarge the file. Why the cdata? I don't think RSS feed readers can do flash!
-
Re: Problem with Flash Header
Davewest,
Thanks for the flashkit.com site address. It has some nice info. Some is a bit old, but there is a lot of good information. Like many people using ZC, I am not a programmer. We like to dabble, but we need help - all the help we can get. Thanks.
-
Re: Problem with Flash Header
OK I am not sure exactly what you are saying but I have changed the code up to look like this...
Code:
<div><script type="text/javascript" src="includes/templates/arch_shoppe/jscipt/swfobject.js"></script>
<div id="flashcontent">
<center>
<embed
src="stxbanner.swf"
width=100%
height="110"
allowscriptaccess="always"
allowfullscreen="true"
/>
For some reason I am not able to get it to work with your code. I can change the width to an actual px however if i set it to a certain number and the resolution is much bigger than that it won't stretch to fit that will it?
-
Re: Problem with Flash Header
Quote:
Originally Posted by
davewest
Should upgrade to 2.0, 1.4 had issues with more then one movie on a page. also had conflicts with other mods. Try it without the %. It needs the size and not a percentage. Flash movies should be able to expand without having to enlarge the file. Why the cdata? I don't think RSS feed readers can do flash!
I just did a very quick read of some of the latest response in this thread. The only small comment I can help with is that one needs to be careful with your code depending on which version of swfObject you use. Code that was meant for the old 1.4 version will not work well using the 2.0 or 2.1 version of swfObject. And definently, code meant for version 2.1 will not work using the old swfObject 1.4. I found that out the hard way. So, the bottom line is one should stipulate the version of the swfObject when providing the code that will implement flash.
-
Re: Problem with Flash Header
Anyone with any thoughts on how to get this working?
-
Re: Problem with Flash Header
HELP I got the size and seems the dimensions are OK for at least resolutions up to 1280 x 768 but I have lots of black on the top and bottom. How do i get rid of this.
my logowrapper is set to
Code:
#logoWrapper{
/*background-image: url(../images/headerbg.gif);*/
background-repeat: repeat-x;
background-color: #000000;
height:140px;
margin: 0em;
padding: 0em;
}
I have this set in my tpl_header.php
Code:
if ($current_page_base == 'index') {
require($template->get_template_dir('top_main.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/top_main.php'); }
else {
require($template->get_template_dir('top.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/top.php'); }?>
My top_main.php is where the flash file is located and that looks like this.
Code:
<div><script type="text/javascript" src="includes/templates/arch_shoppe/jscipt/swfobject.js"></script>
<div id="flashcontent">
<center>
<embed
src="stxbanner.swf"
width=100%
height=100%
allowscriptaccess="always"
allowfullscreen="true"
/>
</center>
I have tried many other techniques even the swfobject 2.0 and can't seem to get it working correctly. Any thoughts on how to get this correct. I am a newbie and need explanation. Thanks for your time!!
-
Re: Problem with Flash Header
Quote:
Originally Posted by
Sawhorse
I just did a very quick read of some of the latest response in this thread. The only small comment I can help with is that one needs to be careful with your code depending on which version of swfObject you use. Code that was meant for the old 1.4 version will not work well using the 2.0 or 2.1 version of swfObject. And definently, code meant for version 2.1 will not work using the old swfObject 1.4. I found that out the hard way. So, the bottom line is one should stipulate the version of the swfObject when providing the code that will implement flash.
True, but the difference in 1.4 and 2.0 code is easy to see. I haven't had time to look at 2.1, will have to check it out. I forget that I tend to see code differently.. so I do need to tag it better for others.
welchyboy,
Your switching code faster then I can keep track! For complete info on swfObject go to their web site and read up.. http://code.google.com/p/swfobject/wiki/documentation
As for the size issue, code in a resolution sniffer ether in your php or swf movie to auto size it...
-
Re: Problem with Flash Header
Quote:
Originally Posted by
davewest
True, but the difference in 1.4 and 2.0 code is easy to see. I haven't had time to look at 2.1, will have to check it out. I forget that I tend to see code differently.. so I do need to tag it better for others.
welchyboy,
Your switching code faster then I can keep track! For complete info on swfObject go to their web site and read up..
http://code.google.com/p/swfobject/wiki/documentation
As for the size issue, code in a resolution sniffer ether in your php or swf movie to auto size it...
LOL I am so sorry I am just out of time and I am trying not to solely reley on the forum because I DO WANT to actually learn the stuff I am just sooo pressured for time it is really driving me crazy. I have researched swfobjects 2.0 downloaded the 2.1 beta zip from the website and I even watched a video on how to do it but for some reason something isn't correct so I continuously go back to the embed code which is actually working with my site right now and has been working. I just can't get it exactly the way i want. As for the resolution sniffer I haven't a clue what that is so i will research it and see if i can find some information on how to go about doing that.
I forgot to edit that my flash file is 2600 by 300 which is RIDICULOUS but that is the only way i could figure out how to get it to work with other resolutions. will the resolution sniffer fix this so i can make the actual flash file smaller?
-
Re: Problem with Flash Header
Quote:
Originally Posted by [I
I tried this script and I get a blank flash box in IE and nothing shows up in FireFox- [/I]
<script type="text/javascript">
swfobject.embedSWF("fitness_mega_flash.swf", "fitness_mega_flash.swf", "430", "390", "7.0.0");
</script>
<div id="myContent"><img src="images/large/fitness_mega_flash.swf" hight="430" width="390"/></div>
When I Try loading off of swobject.js all I get is "This Text is replaced by Flash movie" in both IE and FireFox. The good news is at least it's doing the same thing in both
-
You know, the problem might be as simple as your path for your SWF. It might be that swfobject can't find your SWF and thus your get a "blank flash box". Try putting your SWF in your root directory and see if that does not help. It might!!
-
Re: Problem with Flash Header
Crazy enough I got it to work. I am not sure how I have tried the swfobject 2.0 multiple times and even downloaded the "air" one which is a generator. But for some reason it decided to work.
In reply to sawhorse I actually do have my swf in the root directory which wasn't working at first but not it is. Not sure what turned that around but here is what i did...or at least what i have.
I downloaded the swfobjects 2.0 and also used the air generator thing which you can download both of them from here..
http://code.google.com/p/swfobject/
I used the generator and typed in the name of the file and the parameters and generated the code. I uploaded the .js file and the swf file to the server.
My code looks like this for the flash
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="includes/templates/YOUR TEMPLATE/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.play = "true";
var attributes = {};
attributes.align = "middle";
swfobject.embedSWF("myflashfile.swf", "myflashfile", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id="myflashfile">
<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>
</div>
</body>
</html>
I hope with this code I would be able to help someone out.
Now for the bad news...I am still having trouble with the black "space" above and below the actual flash file. I believe it is part of the flash file but not sure how or why. This black space also will need to be set to change with resolution i think because I changed resolution and my flash files width went all the way across like it is supposed to (at least for 1280 x 768) however the black color either gets smaller or larger depending on resolution...
I have researched more about the resolution "sniffer" and found different codes but not sure exactly what I need to do. I found this piece of code..
Code:
if((System.capabilities.screenResolutionX>1024)&& (System.capabilities.screenResolutionX<1280)){ //Place your actions here }
Also found this code
Code:
if(System.capabilities.screenResolutionX==1024){ //Place your actions for 1024 resolution here } else if(System.capabilities.screenResolutionX==800){ //Place your actions for 800 resolution here }
Neither of these I know anything about or how to place my own actions. I will have to refer to the flash file obviously but not sure exactly how to do this part. Anyone have any information about this...
THANKS FOR THE HELP GUYS YALL ROCK :clap:
-
Re: Problem with Flash Header
Does anybody know how to get this code to work for the resolution problem?
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function redirectPage() {
var url640x480 = "indexlinks640.html";
var url800x600 = "indexlinks800.html";
var url1024x768 = "indexlinks1024.html";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url640x480;
}
// End -->
</script>
I tried putting this into my top_main.php which contains my flash information. I took the current flash information out and placed this code in its place. Then I changed the html pages to top_main1.php which contained my "working" flash information. However all i got was a black screen.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
...I am still having trouble with the black "space" above and below the actual flash file. I believe it is part of the flash file but not sure how or why. This black space also will need to be set to change with resolution i think because I changed resolution and my flash files width went all the way across like it is supposed to (at least for 1280 x 768) however the black color either gets smaller or larger depending on resolution...
I have researched more about the resolution "sniffer" and found different codes but not sure exactly what I need to do. I found this piece of code..
I do not know anything about a resolution "sniffer" and I doubt that you need it. What I am aware of is that you must keep that same proportions. If you force a certain a length then the width will be proportional to the original. If you do not meet the the exact proportion the difference will be filled in (depending on the setup) with black/white.
-
Re: Problem with Flash Header
So what does that mean...I should set it to percent or an actual length? Because I believe everytime I try and specify a specific length of the flash content it overshoots the page completely or it will be short. I just want something that is normal what does everyone else do with their flash banners lol?
-
Re: Problem with Flash Header
Sorry for not making this clear.
1) I am talking about a flash video in general, not specifically about a banner
2) I am using swfObject ver2.1 and in 2.1 you specify length and width.
3) If your video is in a 9:16 ratio but your space you are trying to put your video in is a 10:16 ratio you will get black space.
4) If you are putting your video on your main page (define_main_page.php) and you are using swfObject ver2.1 you can specify the size of the video:
Code:
var att = { data:"includes/templates/Series_12_Horses/flash/homepage.swf", width:"600", height:"240"};
(The above was copied from my site main page)
5) Note that the swf and the stipulated width and height (width:"600", height:"240") must be in the same ratio (mine is 1:1)
6) If it is not in the same ratio I BELIEVE the video will have black space.
This is all the info I have. I am not a programmer. Someone more skilled will need to help you further.
Best of luck.
-
Re: Problem with Flash Header
OK I will research this line of code to see what it does for me. I understand what you are saying but i think the problem is if i set the banner to say i don't know 700 width by 120 height that might look great with no black space what so ever and everything looks good on my monitor. But if someone starts looking at my site with other resolutions the page will loko different because 700 pixels wide will look much different on a larger resolution. So I do understand and with videos i don't think resolution will affect this too much. But the banner I was hoping to have it across the top of the page. I thank you for your comments and I will research that piece of code. If anyone else has a solution they would like to propose please let me know. Thanks
-
Re: Problem with Flash Header
Hi!
I am a new Zenner. Please help me out to setup a flash banner at white space located under the header, in replacement of bg_banner image. You may check the webpage at http://www.rabiabooks.com/ for reference.
I look forward to your nice co-operation.
Regards,
Fareed
-
Re: Problem with Flash Header
Template looks like one from Template Monster..
If so, search forums for Template Monster..nothing
is standard in their designs so adding flash banner
will not be straightforward.
:(
-
Re: Problem with Flash Header
Still having issues with the "black" space on my flash banner can any one help me please.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
Still having issues with the "black" space on my flash banner can any one help me please.
Without url of site not possible to view existing code
:blink:
-
Re: Problem with Flash Header
-
Re: Problem with Flash Header
Do not use same formula for embedding flash header
as used on that site, so without having actual swf file,
sorry, cannot help/advise further.
:dontgetit
-
Re: Problem with Flash Header
Try editing your Stylesheet [stylesheet.css around line 436]
Change height from 140 to 114. That should help.
PHP Code:
#logoWrapper
background-color:#000000;
background-repeat:repeat-x;
height:114px;
margin:0;
padding:0;
-
Re: Problem with Flash Header
This is a great suggestion. I have worked with this part before but didn't get too far. I tried it just now and changed it to 114 and the height looks good but now the width shrunk big time. So now there are huge black spaces on the left and right. I added the width:"100%"; to the logowrapper and changed the height to 100" and I see LOTS and LOTS of black space above and below the file but this is because the actual height of the flash file is rather big. I will change that to 140 or 150 and see how that looks with the height at 100%. Because the width of the banner looked great when the height is bigger for some reason. I think the solution is somewhere in here i think we are very close. Thanks for your help!!
MISTY are you wanting my swf file? Or what can i give you to help you out so you can help me out lol. Let me know and I will do what i can. Thanks for everyone's help yall are amazing!
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
This is a great suggestion. I have worked with this part before but didn't get too far. I tried it just now and changed it to 114 and the height looks good but now the width shrunk big time. So now there are huge black spaces on the left and right. I added the width:"100%"; to the logowrapper and changed the height to 100" and I see LOTS and LOTS of black space above and below the file but this is because the actual height of the flash file is rather big. I will change that to 140 or 150 and see how that looks with the height at 100%. Because the width of the banner looked great when the height is bigger for some reason. I think the solution is somewhere in here i think we are very close. Thanks for your help!!
Sawhorse nailed it for you some time back, Flash is not the same as a image. It doesn't distort like a image. When the space it occupies is not the same ratio as the flash stage, the ratio changes to fit the entire movie leaving the stage background color and any peace of animation that is off stage in view. You use black as your stage background, thus the black borders. My flash banner on my blog was designed for fast loading. It's was designed at a 1/3 of it's intended display size. It too would show it's background and off stage animation if I didn't adhere to it's size ratio.
I would down size your flash for faster load. You also seem to be loading swfobject twice as will two head sections, not sure if this is intended, but may give you trouble down the road. The more things you load that you don't need can slow down page load...
-
Re: Problem with Flash Header
Quote:
Originally Posted by
davewest
Sawhorse nailed it for you some time back, Flash is not the same as a image. It doesn't distort like a image. When the space it occupies is not the same ratio as the flash stage, the ratio changes to fit the entire movie leaving the stage background color and any peace of animation that is off stage in view. You use black as your stage background, thus the black borders. My flash banner on my blog was designed for fast loading. It's was designed at a 1/3 of it's intended display size. It too would show it's background and off stage animation if I didn't adhere to it's size ratio.
I would down size your flash for faster load. You also seem to be loading swfobject twice as will two head sections, not sure if this is intended, but may give you trouble down the road. The more things you load that you don't need can slow down page load...
Well what I did is change the stage color to the same color as the background and got it as close as i could. It is barely noticeable now. I am interested in making the flash file actually smaller so it will load faster it is a little less than 700k. Which is big for 56k. However I want it to look good and the reason it is soooo big is because my flash files width is 2600 so I have to make the image huge. Although I have a flash loader which at least will tell the customer that it is loading but if i can while making it look good load a little faster. Thanks for all your help and I think I am finally getting the flash file at least decent I am almost happy with it lol. Any suggestions on how to make it better or quicker? I have only tested the file with about 1280 by 768 and lower resolution.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
Any suggestions on how to make it better or quicker? I have only tested the file with about 1280 by 768 and lower resolution.
OK... first, there are only three resolutions in flash, High, Medium, and Low. The default is High if not set through the param command. The size is what I think your referring to, basically is the size of your stage. Depending on what your using as a image depends on how good it looks. On my banner, it's only 26kb and is pack with animation. It could have been 8kb, but I used a jpg for the scrolling background graphic. A good book if you have time is Flash Hacks by Sham Bhangal put out by O'Reilly. Good tips on using scripting to reduce file size and incressing animation. The more image you can create in flash and less outside formated images, like jpg's, the smaller the file size. Also, raster graphics, which is what your creating, has very little if any distortion when changing size in flash.
-
Re: Problem with Flash Header
Yeah I will check out that book and I do understand by adding these images it making my flash file huge. I did create these in photoshop but not sure if i want to lower the quality. I am sure I can change it to like a gif or another format to lower the size i just don't want to mess it up too much now because I am pretty much happy with how it looks now. Thanks for all your help and I will see what i can do. Thanks again
-
Re: Problem with Flash Header
Well confused on how to get this working.
Trying to put a flash file in a banner on the header.
This is what I started with that did not work. This is is in the html part of the banner page.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub...ersion=8,0,0,0" width="728" height="90">
<param name="movie" value="http://www.lozer.co.uk/shop/images/b...eaderboard.swf" />
<param name="quality" value="high" />
<embed src="http://www.lozer.co.uk/shop/images/b...eaderboard.swf"
quality="high"
type="application/x-shockwave-flash"
width="728"
height="90"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Have installed flash sidebox.
What do I need to put in the html section to get this working please.
Regards
Laurie
-
Re: Problem with Flash Header
Quote:
Originally Posted by
chalfontgifts
Well confused on how to get this working.
The flash banner is there, increasing the height in your CSS for logoWrapper should give it more space. Looking with firefox 3.
-
Re: Problem with Flash Header
Hi Dave
It is there in firefox, but not in IE. That is why I wanted to implenent this contribution, but can't get a drift of what I have to put in the html section of the banner setup to get it to display.
The banner was 728x90 in size. When I adapt the sample code it still shows small.
Can you give me some clues as to what I have to put in here and what each bit does.
I deally I want to display the banner and when I click on it it takes me to a particular page on my site.
Regards
Laurie
-
Re: Problem with Flash Header
Quote:
Originally Posted by
chalfontgifts
Hi Dave
It is there in firefox, but not in IE. That is why I wanted to implenent this contribution, but can't get a drift of what I have to put in the html section of the banner setup to get it to display.
The banner was 728x90 in size. When I adapt the sample code it still shows small.
Can you give me some clues as to what I have to put in here and what each bit does.
I deally I want to display the banner and when I click on it it takes me to a particular page on my site.
Regards
Laurie
If your using IE7, then IE should ask to display it. If IE6 and below, you need a plugin to view flash or shockwave objects. http://www.adobe.com/shockwave/downl...ShockwaveFlash
I use swfObject for a walk around for IE7 asking permission.
-
Re: Problem with Flash Header
OK I am sorry I guess I am a little slow but this is where I am at on my flash header. I have it set to 110px as my height in the logowrapper.
my code for the flash file is here.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="includes/templates/arch_shoppe/jscript/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.play = "true";
var attributes = {};
attributes.align = "middle";
swfobject.embedSWF("stxbanner.swf", "stxbanner", "100%", "100%", "9", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id="stxbanner">
<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>
</div>
</body>
</html>
The width of the banner is the only problem from what i see across different resolutions. The height is set to 110px and that is working out great. But since it is set to that now i guess to keep porportions or something it set the width to something smaller. Can anyone figure this one out.
-
Re: Problem with Flash Header
Width of template should be same width as flash swf..
currently it is not...hence spaces at left/right side.
-
Re: Problem with Flash Header
I believe that both Davewest & Misty have given you the reason why your swf does not fit your flash stage (the reason why you are getting black or what ever you have set as your stage background). Let me try to be specific
1) If your swf is say 1280px x 768px you have a 5 to 3 image ratio.
2) If you make your flash stage only 110px high and your swf has a 5 to 3 image ratio the image you will see on your banner will only be 183px wide.
3) The reason why it will only be 183px wide is that your swf must display in the same ratio as the original swf (5 x3).
4) If you want to display a banner that is wider than 183px and you keep your display width at 110px you must make your original swf wider but not higher.
5) For example if you want to display a banner that is 730px by 110px (approx. 20 by 3 ratio) you must make your original a 20 by 3 ratio
6) Thus your original 1280px x 768px (a 5:3) should be 5120px by 768px (20:3) to fit on the flash stage correctly.
7) You do not have to have an exact 5120 x 768 swf original image as long as you have the correct proportion. You could do a 2560ps x 384px swf or anything else that keeps the same ratio.
I hope I am being helpful. Both Davewest & Misty have a better grasp of this than I. All I am trying to do is be a bit more concrete.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
Sawhorse
I believe that both Davewest & Misty have given you the reason why your swf does not fit your flash stage (the reason why you are getting black or what ever you have set as your stage background). Let me try to be specific
1) If your swf is say 1280px x 768px you have a 5 to 3 image ratio.
2) If you make your flash stage only 110px high and your swf has a 5 to 3 image ratio the image you will see on your banner will only be 183px wide.
3) The reason why it will only be 183px wide is that your swf must display in the same ratio as the original swf (5 x3).
4) If you want to display a banner that is wider than 183px and you keep your display width at 110px you must make your original swf wider but not higher.
5) For example if you want to display a banner that is 730px by 110px (approx. 20 by 3 ratio) you must make your original a 20 by 3 ratio
6) Thus your original 1280px x 768px (a 5:3) should be 5120px by 768px (20:3) to fit on the flash stage correctly.
7) You do not have to have an exact 5120 x 768 swf original image as long as you have the correct proportion. You could do a 2560ps x 384px swf or anything else that keeps the same ratio.
I hope I am being helpful. Both Davewest & Misty have a better grasp of this than I. All I am trying to do is be a bit more concrete.
Wow You and misty rock lol that is all I have to say. I haven't tried anything yet but I will do this. Let me just make sure I am understanding. So if i am wanting to keep the same height as it is right now...not by changing my flash file I like the size of it right now...all i would need to do is make the width larger in the actual flash file? What kind of size am i looking at to work with like a 1600 wide resolution. I want to make sure it is viewable for the larger resolutions as well. Thanks again for the very in depth information. I will try this and see what kind of luck i have.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
Let me just make sure I am understanding. So if i am wanting to keep the same height as it is right now...not by changing my flash file I like the size of it right now...all i would need to do is make the width larger in the actual flash file?
YOU MUST change the image ratio of your original swf file to match the flash display stage ratio. If you do not change your original swf file to match the flash display stage ratio you will always see part of the flash stage in the banner. If you want a 20:3 display banner then you must edit your original swf and save it so it has a 20:3 image ratio.
The number of px you have really only deals with image quality and final size of your swf. Generally, more px - better quality - larger file size - slower image rendering.
Davewest & Misty back to you. I do not think I have more I can add.
-
Re: Problem with Flash Header
Much easier to have flash swf file EXACT same width and
height as template header settings
:smile:
-
Re: Problem with Flash Header
Misty,
Yes, it is easier. You know what you have, and that is how I do it. But, I believe it is not mandatory.
-
Re: Problem with Flash Header
OK I am trying to understand bare with me lol. I can easily set the #logowrapper to say width:900px; and height: 110px; easily. Then change the flash file to match these. What I don't understand is when you change resolutions that wont matter? For example 600px on a 800 x 600 page and a 1280 x 768 page look completely different. My other issue is that I am very happy with the height of my banner right now. Not meaning the logowrapper size as 110px I mean if i were to change the height of my flash file from whatever it is like 300 to 110 the height would really change and the logo won't be readable. Am I doing something wrong. I am going to mess around with it right after this post and I will see if i can make something happen.
-
Re: Problem with Flash Header
OK I have tested it and for some reason it isnt working. Or i am doing something wrong again which is possible. I put my flash file to height: 110px; and width: 887px; as well as my #logowrapper it works great in 1024x768 which I am using. However if the resolution is changed it still looks bad. What is the problem. If you go to the site now you will see that the logowrapper is set as i said but the flash is not anymore. I changed it back for now. Please let me know what i could be doing wrong. Thanks again for ALL your help. Everyone who has helped so far! Much appreciated!
-
Re: Problem with Flash Header
I looked at your site. All I can tell you is that you have a very big swf. It takes a while to load. I do not have the expertise to go any further. Someone else may be able to help.
-
Re: Problem with Flash Header
Yes you are very right...That is my problem. I think I am doing something wrong I have never seen a flash file 2600px wide which this one is. Like I said I did shorten it to about 887px by 110 px which will make it a LOT smaller however I need the flash file to ALWAYS fit between the page margins of the logowrapper.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
Yes you are very right...That is my problem. I think I am doing something wrong I have never seen a flash file 2600px wide which this one is. Like I said I did shorten it to about 887px by 110 px which will make it a LOT smaller however I need the flash file to ALWAYS fit between the page margins of the logowrapper.
One design concept is to keep it simple and small. Faster loading means they may actually see what you spent so much time on. This applies to flash as will. Using images inside of flash increases it's size. Best practice is to size your images just to what you need, no smaller or larger then that. To make something totally free of size distortion, don't use any images at all.
I'll load a image and then begin to draw and pant a duplicate image within flash making a raster image. Once I'm done, I'll delete the jpg image. This leads to a design that can be scaled to any size I want with no distortions. For some of my banners that I want to load fast, it's all done in action script with maybe a background color.
As for your concerns about screen size, code for the average size, or create a resolution sniffer. Check for res and code your css for a set size screen and change size of things. To hit sizes from PDA's on up to TV's, your going to need to code different pages for each and redirect.
The sniffer below is just a simple one I used to check for browser and load a css that works for them. Half the code was deleted to down size my message.
Code:
<!-- begain detect witch CSS to use
var ua = window.navigator.userAgent;
var tTest = 0 // test for all others
if(ua.indexOf("WebTV")>0) { //for webTV users
ua = "WebTV"
tTest = 1
document.write('<style type="text/css"><!--');
document.write('p { font-family: "Comic Sans MS", "Times New Roman", serif, Times; font-size: 80%}');
document.write('a:link { color: #0000FF; text-decoration: none; font-family: "Comic Sans MS", "Times New Roman", serif, Times; font-weight: bold}');
document.write('--><\/style>');
//alert(ua);
}
else if(ua.indexOf("MSIE")>0) { //for IE users
ua = "MSIE"
tTest = 1
document.write('<style type="text/css"><!--');
document.write('p { font-family: "Comic Sans MS", "Times New Roman", serif, Times; font-size: 100%}');
document.write('a:link { color: #FF0000; text-decoration: none; font-family: "Comic Sans MS", "Times New Roman", serif, Times; font-weight: bold}');
document.write('--><\/style>');
//alert(ua);
}
else if(ua.indexOf("I")>0) { //for Netscape users
ua = "I"
tTest = 1
document.write('<style type="text/css"><!--');
document.write('body { background-color: #FFFFFF; background-image: url(Graffics/bakgrond.gif)}');
document.write('p.navigation-bar { background-color: #00ffff; border: medium #0000ff groove; padding: 1%; text-align: center; font-size: 90%; background-image: url(Graffics/flamback.gif)}');
document.write('--><\/style>');
////alert(ua);
}
else if(ua.indexOf("Gecko")>0) { //for Mozilla/Firefox users
//alert(ua);
ua = "Gecko"
tTest = 1
document.write('<style type="text/css"><!--');
document.write('body { background-color: #FFFFFF; background-attachment: fixed; background-image: url(Graffics/bakgrond.gif) }');
document.write('a:link { color: #FF0000; text-decoration: none; font-family: "Comic Sans MS", "Times New Roman", serif, Times; font-weight: bold}');
document.write('--><\/style>');
//alert(ua);
}
else if(tTest == 0){ //default for all others
document.write('<style type="text/css"><!--');
document.write('p { font-family: "Comic Sans MS", "Times New Roman", serif, Times; font-size: 100%}');
document.write('a:link { color: #FF0000; text-decoration: none; font-family: "Comic Sans MS", "Times New Roman", serif, Times; font-weight: bold}');
document.write('--><\/style>');
//alert(ua);
}
// end -->
Sorry for getting off track with web design in stead of flash designs. I've just installed a banner on my web site that's 300x75 expanded to 500x125. The only true image is the boy in the ghost costume.
-
Re: Problem with Flash Header
I understand by adding jpegs to the flash file it is what is making the file larger. However the customer was wanting this particular image as well as their logos in there as well. My main problem and focus is just to make sure it looks good in the browser then if needed I can spend more time decreasing the size of the file. But I need to get it working with other browsers. I am not sure exactly what to do with that res sniffer. I am quite new in css and flash. Still learning all these things at once. I did some research about css switchers I am still looking into this to see if i can make something happen but as of now haven't gotten anywhere. I am not sure how to really make these images in the actual flash file. I am so sorry I am an extreme newbie but I have been working on this site for about 3 months and it is finally coming around thanks to everyone here at zen cart. So I am glad i took on the challenge and began to learn to be a zenner! So thanks again for taking the time out to help a newbie!
-
Re: Problem with Flash Header
This is a site that I would like to be able to do something with...
http://www.themaninblue.com/experime...lutionLayout/#
When you set your resolution to 800 x 600 it uses a completely different stylesheet. than when you set it to something higher than 800 x 600. Most likely I won't change much but I would be able to change the logowrapper size and maybe have it reference a completely different swf if i needed to. Any thoughts on how to approach this. I know you gave me your code I am just not sure how to use it lol.
-
Re: Problem with Flash Header
Hi
I Am using Aleo Flash Intro Banner Maker to produce my flash banners.
This package is able to create swf files with a transparent back ground. I cannot seem to get the html code that I place in the banner setup correct. This is the code I currently have to display a banner, although not sure if this could be cut down to be simpler.
<script type="text/javascript" src="includes/templates/chalfont_common/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.play = "true";
var attributes = {};
WMODE="transparent"
attributes.align = "middle";
swfobject.embedSWF("images/banners/shopheader.swf", "myflashfile", "728", "90", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id="myflashfile">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/d...ash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>
This is the code that Aleo Flash Intro Banner Maker creates.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub...ersion=8,0,0,0" width="728" height="90">
<param name="movie" value="test.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent">
<embed src="test.swf"
quality="high"
type="application/x-shockwave-flash"
WMODE="transparent"
width="728"
height="90"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
How can I integrate the transparent code into the existing code to make this banner transparent.
Regards
Laurie
-
Re: Problem with Flash Header
Without viewing exact url of your site, difficult to advise
BUT
Code:
includes/templates/chalfont_common/swfobject.js
not correct..should be
Code:
includes/templates/chalfont_common/js/swfobject.js
-
Re: Problem with Flash Header
Thanks Misty
The url is www.chalfont gifts.co.uk
Have broken link so google does not crawl.
Thanks
Laurie
-
Re: Problem with Flash Header
Visited site..flash in header, possible flash banner on
right hand sidebox...viewed in both IE7 and Firefox3.
so exact problem is?? Or is it not on your site yet
so can view?
:unsure:
-
Re: Problem with Flash Header
OK the header banner, I want to have this set at transparent background, so that when the winow is reduced in size, it does not get the box edges showing, ie the baground shows through the flash image.
Regards
Laurie
-
Re: Problem with Flash Header
Understood..
never used transparent mode for swf.
Is it not possible to use header background for
background of your swf banner or viceversa
-
Re: Problem with Flash Header
my problem that has been going on long enough with the flash and resolution has been resolved thank to *MISTY* :clap: It happened in another thread which i started. To see the last few posts of the solution which are not much different than in here but helped me out never the less. Here it is...
http://www.zen-cart.com/forum/showth...405#post617405
:clap: THANKS MISTY YOU ROCK :clap:
-
Re: Problem with Flash Header
Quote:
Originally Posted by
welchyboy
my problem that has been going on long enough with the flash and resolution has been resolved thank to *MISTY* It happened in another thread which i started. To see the last few posts of the solution which are not much different than in here but helped me out never the less. Here it is...
http://www.zen-cart.com/forum/showth...405#post617405
THANKS MISTY YOU ROCK
Pleased to hear problem with flash header finally
sorted.
-
Re: Problem with Flash Header
SO AM I! LOL! I OWE IT ALL TO You and the other ZENNERS who have helped me. :clap:
-
Re: Problem with Flash Header
Hi,
after reading 19 page of this thread, still have some problem with my header becoming flash from pic. :(
here is the history of my problem:
I bought a zencart template my web site from http://www.zencartshop.com/. And I am very happy with this template.
I downloaded nnez_flo_20061013 and installed it to my template. Then I've tried this code :
<?php echo get_flashed('bg_header_right','900','260'); ?>
And it works perfectly in Classic Contemporary Green template.
But when i am swiching into my custom template it shows header pic as it was before(nothing changed).
I noticed some differences in the structure of my CSS files and tpl_header.php(custom template tpl, not default one):
1. There is a only one stylesheet.css file in Classic Contemporary Green template. But in my template there are 6 not one *.css files:
print_stylesheet.css
stylesheet.css
stylesheet_boxes.css
stylesheet_css_buttons.css
stylesheet_main.css
stylesheet_tm.css
AND one of them (stylesheet_tm.css) contains line regarding to my site header(bg_header_right.jpg).
Here, the part of my stylesheet_tm.css, relating to the header:
...
#mainWrapper {padding:0 0 0 0;}
.main_width {margin:0 auto; width:1250px;}
ul {list-style:none; margin:0; padding:0;}
.in20{ padding-bottom:20px;}
#header { background:url(../images/fill_header.gif) 0 0 repeat-x;}
#header .row{ width:100%; height:263px;}
#header .bg_header_left{ background:url(../images/bg_header_left.gif) 0 0 no-repeat;}
#header .bg_header_right{ background:url(../images/bg_header_right.jpg) right 0 no-repeat; width:100%; height:313px;}
#header .links { float:left; width:100%; color:#4967A0; font-size:11px;}
#header .inside_links { padding:16px 400px 0 25px;}
#header .links a{ color:#4967A0; font-size:11px; line-height:18px; text-decoration:underline;}
#header .links a:hover{text-decoration:none;}
#header .nav { float:left; position:relative; width:400px; margin:0 0 0 -400px;}
...
2. About tpl_header.php:
this is a part from my template tpl_header.php file:
<div id="header">
<div class="bg_header_left">
<div class="bg_header_right"> <?php echo get_flashed('bg_header_right','900','260'); ?>
<div class="row">
<div class="links">
<div class="inside_links">
<?php #HEADER LINKS START ?>
<a href="<?php echo HTTP_SERVER . DIR_WS_CATALOG ?>"><?php echo HEADER_TITLE_CATALOG; ?></a> |
<?php if ($_SESSION['customer_id']) { ?>
<a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> |
<?php
} else {
if (STORE_STATUS == '0') {
?>
<a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a> |
<?php } } ?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a>
<?php } ?>
<?php #HEADER LINKS END ?>
</div>
</div>
MY QUESTION: WHERE SHOULD I PUT THIS CODE:
<?php echo get_flashed('bg_header_right','900','260'); ?>
AND SHOULD I CHANGE ANYTHING THAN TPL_HEADER.PHP FILE???
THANK YOU VERY MUCH FOR YOUR HELP!!!!!!!!!!!
-
Re: Problem with Flash Header
sorry, maybe I explained myself not so clear I will try again:
1. I intalled: nnez_flo_20061013
Then, I've tried this code (I put into tpl_header.php of
template_default) :
<?php echo get_flashed('bg_header_right','900','260'); ?>
And it works perfectly in Classic Contemporary Green
template.
But when i am swiching into my custom template it shows
header pic as it was before(nothing changed, flash didn't
work).
2. I noticed some differences in the structure of my CSS files and tpl_header.php(custom template tpl, not default one):
(a) There is a only one stylesheet.css file in Classic
Contemporary Green template. But in my template there are
6 not one *.css files:
print_stylesheet.css
stylesheet.css
stylesheet_boxes.css
stylesheet_css_buttons.css
stylesheet_main.css
stylesheet_tm.css
AND one of them (stylesheet_tm.css) contains line regarding
to my site header(bg_header_right.jpg).
Here, the part of my stylesheet_tm.css, relating to the
header:
...
#header .bg_header_right{
background:
url(../images/bg_header_right.jpg
) right 0 no-repeat; width:100%;
height:313px;}
...
(b) About tpl_header.php:
this is a part from my template tpl_header.php file:
<div id="header">
<div class="bg_header_left">
<div class="bg_header_right"> <?php echo
get_flashed('bg_header_right','900','260'); ?>
<div class="row">
<div class="links">
....
</div>
MY QUESTION:
WHERE SHOULD I PUT THIS CODE:
<?php echo get_flashed('bg_header_right','900','260'); ?>
AND SHOULD I CHANGE ANYTHING THAN TPL_HEADER.PHP FILE???
THANK YOU VERY MUCH FOR YOUR HELP. I still hope for some reply!!!
-
Re: Problem with Flash Header
Quote:
Originally Posted by
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
5. 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">
PHP Code:
<!--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.
.
THANK YOU SOOOOO MUCH! You don't how much time I've spent on this. Thanks again for posting step-by-step instructions. Worked like a charm for me. (Tested it on FF, EI, and Opera)
-
Re: Problem with Flash Header
I used the javascript below to add a flash banner to my cart.
it does the job and I was happy with it.
However, it killed image handler 2 mod. Now if I rollover any images the magnifying medium size image no longer shows anywhere.
I then commented out the javascript calling flash and still the image handler mod not working.
I then renamed javascript file (removing the . so can't work) and image handler still not working.
It looks to have broken image handler 2 in my store.
What would be the reason for this? I'd like to use a flash banner but want to keep the image handler 2 module working.
If there is a better way that I can get a flash banner working other than this method please refer.
Thanks for any input.
Quote:
Originally Posted by
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
5. 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 usages, 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">
PHP Code:
<!--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.
.
-
Re: Problem with Flash Header
Hello,
I resolved this issue above in regards to getting Image Handler to work again.
Renaming the javascript minus the . was still effecting the loading so once deleted image handler then worked.
I would still like to be referred to any other flash banner options if anyone has any input.
Thanks
-
Re: Problem with Flash Header
I guess this is off topic, but avoid using flash as much as you can. There are many tasks that can be solved without using flash. Slideshow, for example, can use javascript instead.
-
Re: Problem with Flash Header
Quote:
Originally Posted by
Muzz
I would still like to be referred to any other flash banner options if anyone has any input.
Muzz
The SwfObject referred to in the sample is a older version which did not play will with other code. For the latest version and how to's code.google.com/p/swfobject/wiki/documentation
-
Re: Problem with Flash Header
Quote:
Originally Posted by
Muzz
I would still like to be referred to any other flash banner options if anyone has any input.
Thanks
Look at post 121 in this thread it might help.
Sawhorse
-
Re: Problem with Flash Header
Thanks for your replies:
yellow1912, Davewest & Sawhorse.
I will check out each of your suggestions.
Muz
-
Re: Problem with Flash Header
Just thought I would add that I did use the later version of SWFobject and I have my flash banner working without any probs.
After reading through a lot of flash instructions etc.. Mogensen Moccasin Co has been by far the most helpful by far.
Other posts will miss key points.. give instruction but not say which file to edit.. are outdated by several years so you don't know whether or not it will work in newer browser versions and so on.
-
Adding Flash to main page
Can anyone please help with a flash problem.
I'm trying to add a flash slideshow to my "define_main_page.php"
area of my zen cart site. I'm not sure how, what or where I'm supposed to place code. Can someone please direct me in the right direction. Right now I have an embedded youtube video.
The site is www.childlocatorsystems.com
Thanks in advance.