CSS & Web Design Forum  

Welcome to the CSS & Web Design Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
WM Media Banner

Supporters
Pos Software - POS hardware and Software to track, control and manage your inventory.
Web Templates - BoxedArt is the most reliable source for unlimited template downloads.
Stocks - Everything you need to know about the market.
McKremie.com - Web hosting for personal and business that comes with 24/7 customer support.

Social Bookmarking
WL Marketing - Your #1 source for building links

Go Back   CSS & Web Design Forum > Web Design > AJAX, Javascript & DOM
Reply
 
Thread Tools Search this Thread Display Modes
(#1)
Old
BerlinBrown
Guest
 
Default Javascript and dynamic setting wmode to transparent for flash objects - 01-11-2008, 02:02 PM

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 );
Reply With Quote
(#2)
Old
Stevo
Guest
 
Default Re: Javascript and dynamic setting wmode to transparent for flashobjects - 01-11-2008, 02:39 PM

BerlinBrown wrote:
> I am having an issue with setting wmode to transparent for a flash
> object.


You can't set wmode dynamically. That parameter is only read at object
instantiation time. You can add it and change it all you like, but it
won't have any effect on the object itself. Even if you ask the object
it's value, it might tell you the new value you set, but it won't have
made any difference to it.
Reply With Quote
(#3)
Old
BerlinBrown
Guest
 
Default Re: Javascript and dynamic setting wmode to transparent for flashobjects - 01-11-2008, 03:30 PM

On Jan 11, 10:02 am, Stevo <ple...@spam-me.com> wrote:
> BerlinBrown wrote:
> > I am having an issue with setting wmode to transparent for a flash
> > object.

>
> You can't set wmode dynamically. That parameter is only read at object
> instantiation time. You can add it and change it all you like, but it
> won't have any effect on the object itself. Even if you ask the object
> it's value, it might tell you the new value you set, but it won't have
> made any difference to it.


Would it make any sense to recreate the object? taking all of the
parameters and rebuilding it?
Also, where did you get that information, I couldn't find anything
about it on the web. Especially as it relates to flash objects.
Reply With Quote
(#4)
Old
Stevo
Guest
 
Default Re: Javascript and dynamic setting wmode to transparent for flashobjects - 01-11-2008, 04:16 PM

BerlinBrown wrote:
> On Jan 11, 10:02 am, Stevo <ple...@spam-me.com> wrote:
>> BerlinBrown wrote:
>>> I am having an issue with setting wmode to transparent for a flash
>>> object.

>> You can't set wmode dynamically. That parameter is only read at object
>> instantiation time. You can add it and change it all you like, but it
>> won't have any effect on the object itself. Even if you ask the object
>> it's value, it might tell you the new value you set, but it won't have
>> made any difference to it.

>
> Would it make any sense to recreate the object? taking all of the
> parameters and rebuilding it?
> Also, where did you get that information, I couldn't find anything
> about it on the web. Especially as it relates to flash objects.


Yes recreating the object with the alternate wmode value would work just
fine. I got that information from someone at Adobe.
Reply With Quote
(#5)
Old
David Mark
Guest
 
Default Re: Javascript and dynamic setting wmode to transparent for flashobjects - 01-11-2008, 04:16 PM

On Jan 11, 9:51*am, BerlinBrown <berlin.br...@gmail.com> wrote:
> 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


You mean wmode=opaque.

> 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.


There's nothing you can do about that.

>
> Basically, I am setting wmode to transparent to allow javascript menus
> to overlap flashobjects.


Hide the Flash movie when menus are shown and display it again when
they hide.

>
> 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>
>


XHTML with an embed tag?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Hosting at Triple.com
vBulletin Skin developed by: vBStyles.com

Printing Company  Link Building Services  Scholarship