Jump to content


Automatic Images & Txts Rotation :: Help


2 replies to this topic

#1 DesigningMambo

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 05 July 2007 - 07:47 PM

Hello,
I need help making this script run as an Automatic Rotation. I need everything to work the same. Maybe someone knows what to add new coding for the images, and text to change automatically?

Thanks,

- Andrew

<script language="JavaScript">
<!--


function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://www.dlrinfo.com/main/Caslte-Night-Fireworks.jpg"
myimages[2]="http://www.dlrinfo.com/main/DCA-TowerofTerror.jpg"
myimages[3]="http://www.dlrinfo.com/main/DLR-Big-Thunder.jpg"
myimages[4]="http://www.dlrinfo.com/main/DLR-Partners-statue.jpg"
myimages[5]="http://www.dlrinfo.com/main/DLR-Matterhorn.jpg"

//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]=""
imagelinks[2]=""
imagelinks[3]=""
imagelinks[4]=""
imagelinks[5]=""


var imagetext=new Array()
imagetext[1]="Disneyland's Remember Dreams Come True fireworks"
imagetext[2]="Disney's California Adventure's Tower of Terror"
imagetext[3]="Disneyland's Big Thunder Mountain"
imagetext[4]="Disneyland's SBC Partners Statue"
imagetext[5]="Disneyland's Matterhorn Mountain"


var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1

//var ry=14


document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
document.write('<br>')
document.write('<span class="style3">'+imagetext[ry]+'</span>')

}
random_imglink()
//-->
</script>


#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 05 July 2007 - 09:32 PM

I'm not quite sure what exactly it is you are asking to be honest.
Are you wanting it to automatically randomize itself after every few seconds?
There's plenty of tutorials on that sort of thing if thats the case.
http://www.pixel2life.com/tutorials/javasc...izing_rotation/

#3 DesigningMambo

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 05 July 2007 - 09:41 PM

It only changes if you refresh manually.
I need it to changed by itself.

I have looked.
Not sure how to addon this automatic script to what I have now.

I dont want to change the way it makes it look.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users