Change button state when movie playing ended

Hello !
I have a very basic setup with a button COMP in Toggle Up mode that launch a moviefilein play when clicked.
I would like to get the button back to its initial state (0) when the movie file has ended playing
Any quick simple way to do it ?

Note : not a Pyhtoner here

Thanks !

hi,

Ideally i would use python to toggle the button on/off
Without python you could use some CHOPs like add an infoCHOP and drag/drop the moviefileIN on it to get access to the exposed status and use the relevant status to trigger the button.

Thanks I am sure there is some python script to do it but I can’t find it.
And yes the idea is to put a trigger on the last frame that switch the button state, but I don’t know how to insert this value in the buttonCOMP.
This is a more precise explanation of what I try to achieve :

  • start playing the movie file by pressing the button (status goes from 0 to 1)
  • stop the movie manually before the end if I need to (so I just have to click again on the button and it goes back to 0)

No problem so far, but I want to add this action :

  • add a feature that automatically change the button state to 0 (in addition to the manual way to do it) at the end of the movie, so it goes back to its initial state 0 without I need to click it

And this is where I am stuck…

Button value is linked to the “play” and “cue” (rewind to cue value) parameters of the movieFileIn

This example checks if we reached the end of the video (“last_frame” channel from infoCHOP) and send the button a click via Python : click(0) to toggle off.

buttonClick.tox (1.3 KB)

1 Like

Damn I was so close, I was just missing the op('button1').click(0)
Thank you !!!