Ok I created some flash rotator-onclick event to change swf files. But this won't work in IE because the javascript isn't able to create a closing embed tag. Here is the script:
<script type="text/javascript">
var flashNumber = 0;
var items = 3;
var i = 0;
films = new Array(items)
films[0] = "movies/animals1.swf";
films[1] = "movies/mammyblue2.swf";
films[2] = "movies/whitebird1.swf";
function create(flashNumber){
var obj = document.createElement('object');
obj.setAttribute('width','400');
obj.setAttribute('height','300');
obj.setAttribute('id','test');
var par = document.createElement('param');
par.setAttribute('name','movie');
par.setAttribute('value',films[flashNumber]);
var emb = document.createElement('embed');
emb.setAttribute('src',films[flashNumber]);
emb.setAttribute('width','400');
emb.setAttribute('height','300');
var container = document.getElementById('container');
document.body.appendChild(container);
container.appendChild(obj);
obj.appendChild(par);
obj.appendChild(emb);
}
function deleter(){
var d = document.getElementById( 'test' );
d.parentNode.removeChild( d );
i++;
if (i == items)
i = 0;
create(i);
}
onload = function(){
create(0);
};
</script>
The output HTML is as follows:
<object width="400" height="300" id="test">
<param name="movie" value="movies/animals1.swf">
<embed src="movies/animals1.swf" width="400" height="300">
</object>
You see I can't get the closing embed tag and because of this the script doesn't work in IE