Video Stimulus with mouse

What are you trying to achieve?: I am trying to create a experiment where the participant chooses with video he would like to see. For this i am trying to have 4 videos in the window that only should start when the mouse is in the video frame. When the mouse is in the frame, the video should last about 3s. And when the participants clicks on the video that should select the video for another routine.

What did you try to make it work?: I tried to use the builder and put in the conditiong of the videos “mouse”, but it doesn´t works. I also tried to use code.

Begin Routine tab


Each Frame tab

if mouse.isPressedIn(movie, buttons=[0]):