Para hacerlo en javascript, tenés que hacer lo mismo que harías para hacer un sistema de imágenes o banners aleatorios (buscá en las faqs) y luego incrustar el swf con el cúdigo normal de incrustación swf pero escrito con innerHTML. Muestro un ejemplo no aleatorio pero que puede servirte para arrancar.
Código:
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
var contador=0;
function cambia(){
contador++;
var que=document.getElementById("pepe");
for(i=0;i<que.childNodes.length;i++){
que.removeChild(que.childNodes[i]);
}
que2=document.createElement('div');
que2.innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='720' height='356'><param name='movie' value='anim_home2.swf'><param name='quality' value='high'> <embed src='anim_home2.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='720' height='356'></embed></object>";
que.appendChild(que2);
}
</script>
</head>
<body onLoad="cambia()">
<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td id="pepe"></td>
</table>
</body>
</html>