Search code examples
htmlcssflashactionscriptcs3

Positioning flash content using CSS


I have a generated HTML page with flash content in it. I am trying to reposition the flash content and make it "absolute". I have tried to wrap the object tags with a div tag, but to no avail. Can anyone tell me how to do this? Removing the generated positioning attributes does not work.

See relevant code below (it is not very neat, but this is how it is generated. I have removed most irrelevant code):

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>* welcome *</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#000000">
<script language="javascript">
if (AC_FL_RunContent == 0) {
    alert("This page requires AC_RunActiveContent.js.");
} else {
    AC_FL_RunContent(
        'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
        'width', '430',
        'height', '200',
        'src', 'bar',
        'quality', 'high',
        'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
        'align', 'right',
        'play', 'true',
        'loop', 'true',
        'scale', 'showall',
        'wmode', 'transparent',
        'devicefont', 'false',
        'id', 'bar',
        'bgcolor', '#000000',
        'name', 'bar',
        'menu', 'true',
        'allowFullScreen', 'false',
        'allowScriptAccess','sameDomain',
        'movie', 'bar',
        'salign', ''
        ); //end AC code
}
</script>
<noscript>
<div style = "position: absolute">
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"          codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="430" height="200" id="bar" align="right">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="bar.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />
    </object>
</div>
</noscript>

Thanks in advance!


Solution

  • you should place the JS script that actually creates you object inside your div not before it.