This sample experiment uses a questionnaire/survey task to demonstrate using SlideImage sub-objects to display an image only after the subject has clicked within a designated area. It also demonstrates how to permit the subject to decide when the trial should end by clicking on a designated area, and how to record statistics for multiple responses on the same Input object.
The SlideImage sub-objects that will display an image only after the subject clicks on them have their 'Filename' fields set to reference an attribute (i.e., the 'Check1' sub-object references '[Check1Image]', and so on). At the start of the trial, these attributes are set with the filename of a 'blank' image (i.e., a BMP image that visually indicates that no response has been made), and will be reset individually throughout the trial when the subject clicks on the corresponding sub-object.
The HitTest method of the 'Stimulus' object is used to determine which sub-object the subject clicked, if any. As each sub-object is clicked, RT data is recorded. This is calculated by comparing the current Clock.Read to the 'StartTime' variable. This information is presented to the subject after the trial via the 'FeedbackStats' object.
A 'Label' object is placed immediately prior to the 'Stimulus' object. Using an InLine GoTo command, the trial will continue to loop back to the 'Stimulus' object until the sub-object displaying 'Next' is clicked by the subject.