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.