Well, I was unable to get your demo to play onclick using your code but, that might be because I was trying this as a local demo. I was able to get the demo to play using .play() for IE (instead of .GotoFrame(1)) and in FF by using a right click and selecting play from the Macromedia menu. Once I had that happening, I gave the containing division an id:
HTML Code:
<div id="flashDiv" style="position:absolute;top:50px;left:100px;">
Next I wrote a little script that can go in the head:
Code:
<script type="text/javascript">
onload=function(){
var w=window.innerWidth? window.innerWidth : document.documentElement.clientWidth
document.getElementById('flashDiv').style.left=(w-document.getElementById('popup').width)/2+'px'
}
</script>
This did the trick on centering. You are on your own getting the darn thing to play.
Notes: 'document.documentElement' is for use with a DOCTYPE as your demo had one. With no DOCTYPE, it should be 'document.body'. Better still is to use a test function, as some earlier IE versions may not support document.documentElement but, as these browsers probably will not do flash either, I didn't worry about it.
Bookmarks