replicated moviefilein TOP play parameter

hello,

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.

thanks a lot

You should be able to do this with a for loop. Do you have a simple example you can share?

hi,

thanks for the answer.

see example attached

thank you
clipSelector.zip (2.45 MB)

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

def whileOn(panelValue):
return

def onOnToOff(panelValue):
return

def whileOff(panelValue):
return

def onValueChange(panelValue):
return[/code]

Yes this is working perfectly !
With a bit of tab debugging though… Python can be a bit annoying its tab centric indent, i prefer the brackets way :wink:

Thanks a lot for the suggestion !