Question

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!

Was it helpful?

Solution

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

OTHER TIPS

Since your div is wrapped in noscript it will only be shown if javascript is turned off, are you sure that is the behaviour you want?

@Fuzzy76 & @epeleg.blogspot.com is right

@pypmanetjies -> Your code must be like this (shortened):

    <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">
<div style = "position: absolute">
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
    } else {
            AC_FL_RunContent(
...
); //end AC code
    }
    </script>
    <noscript>
          <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>

    </noscript> 
</div>

You might have to set a width and height on your as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top