// erratic behavior but close, not tested in other than IE
function changeWMode(id, wmode)
{
var el = document.getElementById(id
var child = null;
var param = el.createElement('param');
param.name = 'wmode';
param.value = wmode;
el.appendChild(param);
for (var i=0, end = el.childNodes.length; i < end; i++)
{
child = el.childNodes[i];
if (child.nodeName === 'EMBED')
{
child.wmode = wmode;
}
}
}
Main Topics
Browse All Topics





by: mreuringPosted on 2007-08-09 at 17:18:08ID: 19666965
The most likely cause, and I'm just talking of gut-feeling, is that the object won't be able to change the wmode without re-rendering the entire thing. To be honest, I'd be suprised if someone would prove me wrong!
If it were easy enough to render in wmode and be able to swap it on-the-fly you wouldn't have had the need to investigate this cause the CPU-load would have been negligable.
Now I would asume that you could re-render the object in wmode by cloning and replacing it, but something with a 20% CPU load would have to be in constant motion and thus cloning it would reset the movie.
I think the answer in the end will turn out to be: not possible. But I'm keen on finding out if anybody proves me wrong :)