
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.
Bookmarks