PDA

View Full Version : swf banner help


logicuk
01-15-2009, 02:39 PM
i am using this code to rotate banners in my header

$random_number = rand(1, 4);

$random_banner[1] = '<a href="http://www.treatingyourself.com" target="_blank"><img src="http://www.domain.com/forums/banners/Untitled-468x60.jpg" alt="" border="0" /></a>';
$random_banner[2] = '<a href="http://www.dnagenetics.com/" target="_blank"><img src="http://www.domain.com/forums/banners/dna.gif" alt="" border="0" /></a>';
$random_banner[3] = '<a href="http://shop.studiotermini.com" target="_blank"><img src="http://www.domain.com/forums/banners/karl.jpg" alt="" border="0" /></a>';


But if i try a flash one it dont work:

$random_banner[4] = '<a href="http://www.aqualabtechnologies.com/" target="_blank"><img src="http://www.domain.com/forums/banners/aqua.swf" alt="" border="0" /></a>';

Can someone give me the correct code? thanks alot

Dismounted
01-16-2009, 05:02 AM
Flash objects cannot be displayed using an image tag. You must use the object tag. Google will describe the use of this tag.

UKBusinessLive
01-16-2009, 12:55 PM
i am using this code to rotate banners in my header

$random_number = rand(1, 4);

$random_banner[1] = '<a href="http://www.treatingyourself.com" target="_blank"><img src="http://www.domain.com/forums/banners/Untitled-468x60.jpg" alt="" border="0" /></a>';
$random_banner[2] = '<a href="http://www.dnagenetics.com/" target="_blank"><img src="http://www.domain.com/forums/banners/dna.gif" alt="" border="0" /></a>';
$random_banner[3] = '<a href="http://shop.studiotermini.com" target="_blank"><img src="http://www.domain.com/forums/banners/karl.jpg" alt="" border="0" /></a>';


But if i try a flash one it dont work:

$random_banner[4] = '<a href="http://www.aqualabtechnologies.com/" target="_blank"><img src="http://www.domain.com/forums/banners/aqua.swf" alt="" border="0" /></a>';

Can someone give me the correct code? thanks alot

Hi logicuk

I'm looking at doing a rotating banner which auto rotates without refreshes, works simply by showing a banner for so many seconds then moving onto the next one, Been working on my site for 18hrs no probs http://www.ukbusinesslive.co.uk/forum

Only 4 test banners at the moment, i think i have it set for about 8 seconds, That what you can show more ads and increase impressions for paid advertisers or if you have an affiliate account, more chances of a click through.

Take a look and let me know what you think, is a small easy hack to add, I'll email you the link later when i release it in the mod forums ;)

To answer your question you need to use a bit of html code like this for flash banners

<object
type="application/x-shockwave-flash"
data="images/your-banner.swf"
width="468" height="60">
<param name="banner" value="http://www.domain.com/forums/banners/aqua.swf" />
<param name="menu" value="false" />
<param name="quality" value="autohigh" />
</object>



I think thats how its done, you need to try and use this within your banner code :erm:

Not sure 100% but you could try this

$random_banner[4] = '<object
type="application/x-shockwave-flash"
data="images/your-banner.swf"
width="468" height="60">
<param name="banner" value="images/your-banner.swf" />
<param name="menu" value="false" />
<param name="quality" value="autohigh" />
</object></a>';