T
torbs
Hi
I have two quicktime players. I load them like this:
<object id="'movie" class="synligActiveXSpille" (...)
<embed name="movie class="SynligSpiller (...)
References to the two players are kept in the properties of the object
..loadingPlayer and .activePlayer.
In the style sheet the class (u)synligActiveXSpiller changes only the
z-index, while the (u)synligSpiller changes the visibility property.
I have this callback function. The "thisElement" reference is simply
the object (this):
moviePlayer.prototype.switchPlayer = function (thisElement) {
if (thisElement.activePlayer.className == "synligSpiller") {
thisElement.activePlayer.className = "usynligSpiller";
thisElement.loadingPlayer.className = "synligSpiller";
thisElement.loadingPlayer.Stop();
thisElement.loadingPlayer.Play();
} else if (thisElement.activePlayer.className ==
"synligActiveXSpiller") {
thisElement.loadingPlayer.className =
"synligActiveXSpiller";
thisElement.activePlayer.className =
"usynligActiveXSpiller";
}
var temp = [thisElement.activePlayer,
thisElement.loadingPlayer];
thisElement.loadingPlayer=temp[0];
thisElement.activePlayer=temp[1];
thisElement.movieLoaded=true;
}
After the function is finished the classnames have been changed, but
the player do not change the visibility.
It works in IE and Firefox.
mvh
Tor
I have two quicktime players. I load them like this:
<object id="'movie" class="synligActiveXSpille" (...)
<embed name="movie class="SynligSpiller (...)
References to the two players are kept in the properties of the object
..loadingPlayer and .activePlayer.
In the style sheet the class (u)synligActiveXSpiller changes only the
z-index, while the (u)synligSpiller changes the visibility property.
I have this callback function. The "thisElement" reference is simply
the object (this):
moviePlayer.prototype.switchPlayer = function (thisElement) {
if (thisElement.activePlayer.className == "synligSpiller") {
thisElement.activePlayer.className = "usynligSpiller";
thisElement.loadingPlayer.className = "synligSpiller";
thisElement.loadingPlayer.Stop();
thisElement.loadingPlayer.Play();
} else if (thisElement.activePlayer.className ==
"synligActiveXSpiller") {
thisElement.loadingPlayer.className =
"synligActiveXSpiller";
thisElement.activePlayer.className =
"usynligActiveXSpiller";
}
var temp = [thisElement.activePlayer,
thisElement.loadingPlayer];
thisElement.loadingPlayer=temp[0];
thisElement.activePlayer=temp[1];
thisElement.movieLoaded=true;
}
After the function is finished the classnames have been changed, but
the player do not change the visibility.
It works in IE and Firefox.
mvh
Tor