I have a popup that I want to have 1 button that is "pause" when he movie is playing but after pressed it turns into a play button...I know how to animate its state so that it shows "play\pause" graphics but in my script I need to know a good if\then command for this button.
Case "menu_1"
player.playlist.pause();
thats what it is right now and it pauses the video and switches to the "play" graphic for the button...just need a good if\then script for Case "menu_1"
Thanx in advance!

Pause\Play on 1 button on my popup menu
Webstar
Also I would recommend NOT changing the graphic when the button is pressed, since that won't work if the user presses the pause key manually. Rather, I would trigger the graphic change based on the playstate changing; you can do that in the markup by referencing the $playState XPath variable.
dakota367
<
cue begin="($playState=1)" end="($playState!=1)" select="id('playPauseButton')"><set style:backgroundColor="blue"/>
</cue>
<
cue begin="($playState=2)" end="($playState!=2)" select="id('playPauseButton')"><set style:backgroundColor="red"/>
</cue>
Hassan Ayoub
I cannot remember seeing something like this...
Cheers,
Gunnar
CiNN
Using $playState for switching graphics does sound like a better way, can anyone give an example (got no specs)
BTW. if you want to use script just catch the pause, 0xB3, button that should solve the issue when a user presses pause.
ogtr
abhishek_6023
zdrae
[HD-DVD)) Fails}
else if
{you are frustrated}
Post.document.forums=PETER TORR
kewpcg
sunfun
Roger Lipscombe
GCB
Thanks guys
ejschoen1
function pauseHandler()
{
try
{
if (Player.playlist.playState == Player.playlist.PLAYSTATE_PAUSE)
{
Player.playlist.play();
}
else
{
Player.playlist.pause();
}
}
catch (err) {}
}
John Cronan
I've used this:
var playing=1; //put this line outside of function
if(playing==1){
Player.playlist.pause();
playing=0;
}else{
Player.playlist.play();
playing=1;
}
Jan Byvaly
Section 7.5.2.4.1 will point you to Annex W.2-1 (and some other tables).
Note that some XPaths are set at the time the page was loaded (ie, won't change) and others are set every tick (so will change).