This article applies to:
This sample demonstrates two different methods to loop a video until a response is made.
TrialProc1 demonstrates the use of a Label object. When Stimulus is finished playing the video the first time, the CheckResponse Inline checks to see if the participant made a response to the video. If not, the experiment jumps to the Label and repeats Stimulus. This happens repeatedly until a response is made.
TrialProc2 demonstrates the use of Inline Script to repeat the video until a response is made. This method uses a "Do While...Loop" in CheckResponse1. Note that the Duration of Stimulus1 is set to zero while the Time Limit is set to Infinite. This is necessary so that the Loop in script can execute while Stimulus1 is playing the video. First, the Loop determines the video's status of whether it is playing or not. If it is not, it determines the video file's name by referring to the Stimulus Attribute in TrialList. Then it loads the video and calls .Play to repeat it.