B
BerlinBrown
I am having an issue with setting wmode to transparent for a flash
object. Basically, there are pages within an iframe that I cannot
manually set with regular html. But I must use javascript to iterate
when object is found and then add the dynamic wmode = transparent. It
looks like my code should work, when I check it firebugs. When the
setting is set, it shows up in the Firefox firebugs javascript DOM,
but the effect I want doesn't work.
Basically, I am setting wmode to transparent to allow javascript menus
to overlap flashobjects.
This code is what is shown in javascript dom, and this is what my
javascript code does. If I manually hard code this into the html
file, then I get what I want. but dynamically, the effect of the
javascript menus don't work.
<object width="525" height="300" codebase="https://
download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=7,0,19,0" classid="clsid27CDB6E-
AE6D-11cf-96B8-444553540000">
<param value="swf/file.swf" name="movie"/>
<param value="high" name="quality"/>
<embed width="200" height="300" type="application/x-shockwave-flash"
pluginspage="https://www.macromedia.com/go/getflashplayer"
quality="high" src="swf/file.swf" wmode="transparent"/>
<param name="wmode" value="transparent"/>
</object>
Here is my javascript code (pseudo code, I removed some stuff):
function makeOnloadDoubleDelegate(function1, function2) {
return function() {
if (function1) {
function1();
}
if (function2) {
function2();
}
}
}
function otherInits() {
var bottom_doc = document;
if (bottom_doc && bottom_doc.getElementsByName) {
// Find all 'object' tags in the document.
flashObjects = bottom_doc.getElementsByTagName('object');
for (var i = 0; i < flashObjects.length; i++) {
var flashNode = flashObjects[0];
var paramNodes = flashNode.getElementsByTagName('param');
if (flashNode && paramNodes) {
var new_elem = bottom_doc.createElement('PARAM');
new_elem.setAttribute("name", "some_parm");
new_elem.setAttribute("value", "data");
flashNode.appendChild(new_elem);
// For testing, check the param nodes
//for (var j = 0; j < paramNodes.length; j++) {
// var pNode = paramNodes[j];
//}
} // End of If
} // End For
} // End of If
}
window.onload = makeOnloadDoubleDelegate( window.onload,
otherInits );
object. Basically, there are pages within an iframe that I cannot
manually set with regular html. But I must use javascript to iterate
when object is found and then add the dynamic wmode = transparent. It
looks like my code should work, when I check it firebugs. When the
setting is set, it shows up in the Firefox firebugs javascript DOM,
but the effect I want doesn't work.
Basically, I am setting wmode to transparent to allow javascript menus
to overlap flashobjects.
This code is what is shown in javascript dom, and this is what my
javascript code does. If I manually hard code this into the html
file, then I get what I want. but dynamically, the effect of the
javascript menus don't work.
<object width="525" height="300" codebase="https://
download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=7,0,19,0" classid="clsid27CDB6E-
AE6D-11cf-96B8-444553540000">
<param value="swf/file.swf" name="movie"/>
<param value="high" name="quality"/>
<embed width="200" height="300" type="application/x-shockwave-flash"
pluginspage="https://www.macromedia.com/go/getflashplayer"
quality="high" src="swf/file.swf" wmode="transparent"/>
<param name="wmode" value="transparent"/>
</object>
Here is my javascript code (pseudo code, I removed some stuff):
function makeOnloadDoubleDelegate(function1, function2) {
return function() {
if (function1) {
function1();
}
if (function2) {
function2();
}
}
}
function otherInits() {
var bottom_doc = document;
if (bottom_doc && bottom_doc.getElementsByName) {
// Find all 'object' tags in the document.
flashObjects = bottom_doc.getElementsByTagName('object');
for (var i = 0; i < flashObjects.length; i++) {
var flashNode = flashObjects[0];
var paramNodes = flashNode.getElementsByTagName('param');
if (flashNode && paramNodes) {
var new_elem = bottom_doc.createElement('PARAM');
new_elem.setAttribute("name", "some_parm");
new_elem.setAttribute("value", "data");
flashNode.appendChild(new_elem);
// For testing, check the param nodes
//for (var j = 0; j < paramNodes.length; j++) {
// var pNode = paramNodes[j];
//}
} // End of If
} // End For
} // End of If
}
window.onload = makeOnloadDoubleDelegate( window.onload,
otherInits );