torbs wrote:
How can I create a fade with javascript that fade an activex object
(quicktime) to the background and not to the IE windowed control.
I call this function several times, each time decreasing the "opacity".
id is the quicktime activex object.
I have tried to set background:tranparent and
background-color:transparent in my style sheet.
//change the opacity for different browsers
function changeOpac(opacity, id) {
var object = document.getElementById(''+id+'').style;
if (object.opacity) {
object.opacity = (opacity / 100);
} else if (object.MozOpacity) {
object.MozOpacity = (opacity / 100);
} else if (object.MKhtmlOpacity) {
object.KhtmlOpacity = (opacity / 100);
} else if (object.filter) {
object.filter = "alpha(opacity=" + opacity + ")";
}
}
I have no idea how you could do this with your approach. However there
is a very easy way to do timed fades in SMIL 2, if a recent Real player
is installed that has SMIL 2 built in. Many elaborate transition
effects, including fades, are just part of the standard SMIL commands
and are easy to use. Many browsers do not have Active X installed or
have it turned off, so you limit those who can view your effects
greatly if you use ActiveX without an alternative path. Of course if
you are designing a page for a network rather than the general web, you
often can control what is installed on the network. If you insist on
using ActiveX for media, there often is a alternative path that can be
added to the ActiveX object for browsers without ActiveX support. The
crude way is to include an embed in the ActiveX object. However, often
one can include a non-ActiveX object within the ActiveX object that
will automatically be executed if there is not ActiveX support.