I'm wanting to rotate an image, can someone tell me whats wrong with this script? Thanks.
[code=javascript]
<script language="JavaS cript">
<!--
var birth=new array();
for(i=0 ;i<=2;i=i+1)
birth=[i]=new Image();
}
birth[0].mce_src="http://sba-nl-sm6-03.medseek.com/websitefiles/jordanhealthsys 68254/images//birth2.jpg";
birth[1].mce_src="http://sba-nl-sm6-03.medseek.com/websitefiles/jordanhealthsys 68254/images//birth3.jpg";
var current;
current=Math.ro und(2*Math.rand om()-.5);
function rotate(){
if(current<2){
current=current +1;
}
else{
current=0;
}
document.images[0].src=birth[current].src
}
function getfirst(){
document.images[0].src=birth[current].src;
setInterval("ro tate()",2000);
}
//--></script>[/code]
[code=javascript]
<script language="JavaS cript">
<!--
var birth=new array();
for(i=0 ;i<=2;i=i+1)
birth=[i]=new Image();
}
birth[0].mce_src="http://sba-nl-sm6-03.medseek.com/websitefiles/jordanhealthsys 68254/images//birth2.jpg";
birth[1].mce_src="http://sba-nl-sm6-03.medseek.com/websitefiles/jordanhealthsys 68254/images//birth3.jpg";
var current;
current=Math.ro und(2*Math.rand om()-.5);
function rotate(){
if(current<2){
current=current +1;
}
else{
current=0;
}
document.images[0].src=birth[current].src
}
function getfirst(){
document.images[0].src=birth[current].src;
setInterval("ro tate()",2000);
}
//--></script>[/code]
Comment