Tu som ti to urobil.
Nie som JavaScript coder, tak myslím, že to nie je až také hrozné.
Kód:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>výmena banneru</title>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script>
<script type="text/javascript">
// <![CDATA[
var count = 0;
var speed = 10; // nastavenie času v sekundách
var bannerArray = new Array(
"banner1.swf",
"banner2.swf",
"banner3.swf",
"banner4.swf"
); // zoznam URL adries bannerov, ktoré majú byť načítavané
function bannerLoader()
{
swfobject.embedSWF(bannerArray[count], "bannerID", "480", "60", "10", bannerArray[count], null, null);
count++;
if (count == bannerArray.length) count = 0;
}
function bannerInterval()
{
bannerLoader();
window.setInterval("bannerLoader()", speed*1000);
}
// ]] >
</script>
</head>
<body onLoad="bannerInterval()">
<div id="bannerID"></div>
</body>
</html>