PDA

View Full Version : need help


mystic
01-09-2004, 06:50 PM
hello there !

i have javascript code for change images after certain interval,
what i need to do is change the images to flash movies (banners)

code:
<SCRIPT LANGUAGE="JavaScript">
<!--
src = ["image1.gif", "image2.gif", "image3.gif", "image4.gif"]
url =["http://smth.com", "http://smth.com", "http://smth.com", "http://www.smth.com"]
duration = 4;

ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
}
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout("switchAd()",duration*1000);
}
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)
switchAd();
}
//-->
</SCRIPT>

i know this is not actionscript, but anyway if some1 knows how to change src with .swf???


thanks

myst