PDA

View Full Version : Ajaxticker rotation timeout



MobileMe
07-13-2009, 01:09 PM
I'm new to the JavaScript language. My company is running the Ajax ticker on there website which rotates a short series of pictures. I would like to have the ticker rotate through the pictures once, then stop on the last picture. I haven't a clue on how to make this happen. If I'm understanding the script right, there is a timeout delay function in the script.

Can anyone help me with the proper code to make this happen? Any suggestions would be helpful. I included the script as an attachment for reference.

vwphillips
07-13-2009, 02:04 PM
ajax_ticker.prototype.rotatemsg=function(){
var instanceOfTicker=this
if (this.mouseoverBol==1) //if mouse is currently over ticker, do nothing (pause it)
setTimeout(function(){instanceOfTicker.rotatemsg()}, 100)
else{ //else, construct item, show and rotate it!
this.fadetransition("reset") //FADE EFFECT- RESET OPACITY
this.contentdiv.innerHTML=this.messages[this.pointer]
this.fadetimer1=setInterval(function(){instanceOfTicker.fadetransition('up', 'fadetimer1')}, 100) //FADE EFFECT- PLAY IT
this.pointer+=1;
if (this.pointer<this.messages.length) setTimeout(function(){instanceOfTicker.rotatemsg()}, this.delay) //update container periodically
}
}

MobileMe
07-13-2009, 02:23 PM
Thank you very much.

Dazza30
03-19-2010, 11:12 PM
Is there a way to make each message individualy selectable ie 1 2 3 4, ive seen scripts that do this but theyre not ajax based.