i have built a UI which displays a grid of video thumbnails using a replicator COMP.
clicking on a thumbnail launches the video.
What i would like is to make video play exclusive.
i.e. : when i launch a video, every other video should stop playing and cue set back to the first frame.
I can make them play using : op(‘moviefilein1’).par.play = 1 in a panel execute DAT
but i can’t find a way to tell other to stop and reset.
In your panel execute dat in /ui1/ui1/master1/panelexec1 try this:
[code]# me - this DAT
panelValue - the PanelValue object that changed
Make sure the corresponding toggle is enabled in the Panel Execute DAT.
def onOffToOn(panelValue):
pathStart = '../ui1/item'
pathEnd = '/out1'
number = str(me.parent().digits)
op('../../screen/select1').par.top = pathStart + number + pathEnd
op('moviefilein1').par.play = 1
# make a list of all buttons
otherOps = parent(2).findChildren(name="item*", depth=1)
# loop through all of these buttons
for moviePlayer in otherOps:
# stop playing any movieplayer that doesn't match the button
# just pressed
if moviePlayer != parent().path:
moviePlayer.op('moviefilein1').par.play = 0
else:
pass
return