SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: NeoxII on May 15, 2010, 08:33:30 AM

Title: Swf and Image Random banner block
Post by: NeoxII on May 15, 2010, 08:33:30 AM
Hi Simple portal,
I am looking for a html code that will show a random swf and Image banner....

Thank you very much!
Title: Re: Swf and Image Random banner block
Post by: NeoxII on May 15, 2010, 07:03:12 PM
Ok I Have found this solution:

Code: [Select]
<div align="center">
<script language="Javascript">
<!--
var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}



image = new StringArray(2)

image[0] = '<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="160" height="600"><param name="movie" value="http://.......banner.swf"><param name="quality" value="high"><embed src="http://.......banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="160" height="600"></EMBED></OBJECT>'

image[1] = '<a href="http://....." target="_blank"><img src="http://....image.jpg" width="160" height="600"></a>'

var ran = 60/image.length

function radAD() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}

document.write(radAD())

//-->
</script>
</div>

 8)
SimplePortal 2.3.8 © 2008-2024, SimplePortal