Q
QA
Array.prototype.shuffle= function(times){
var i,j,t,l=this.length;
while(times--){
with(Math){
i=floor(random()*l);j=floor(random()*l);}
t=this;this=this[j];this[j]=t;
}
return this;
}
var st=[
"http://javascript.internet.com/img/image-cycler/01.jpg",
"http://javascript.internet.com/img/image-cycler/02.jpg",
"http://javascript.internet.com/img/image-cycler/03.jpg",
"http://javascript.internet.com/img/image-cycler/04.jpg"
]
st.shuffle(200);
function donothing () {return true;}
for(j=0;j<st.length;j++){
setTimeout('donothing()', 2000);
//rImage.src = st[j];
//rText.value = st[j];
document.write (st[j]);
}
**************************************
I want to display them every 2 second. After everything is displayed it then
stops.
But it does not give me the 2s delay. It displays everything once.
var i,j,t,l=this.length;
while(times--){
with(Math){
i=floor(random()*l);j=floor(random()*l);}
t=this;this=this[j];this[j]=t;
}
return this;
}
var st=[
"http://javascript.internet.com/img/image-cycler/01.jpg",
"http://javascript.internet.com/img/image-cycler/02.jpg",
"http://javascript.internet.com/img/image-cycler/03.jpg",
"http://javascript.internet.com/img/image-cycler/04.jpg"
]
st.shuffle(200);
function donothing () {return true;}
for(j=0;j<st.length;j++){
setTimeout('donothing()', 2000);
//rImage.src = st[j];
//rText.value = st[j];
document.write (st[j]);
}
**************************************
I want to display them every 2 second. After everything is displayed it then
stops.
But it does not give me the 2s delay. It displays everything once.