independent stimuli in slide object
Brandon Cernicky
brandon_cernicky at yahoo.com
Wed Apr 13 15:18:31 UTC 2005
Shannon,
So you would like both images to start at the same
time, but one of them with an effective duration of
5000 and the other with an effective duration of 1000?
If this is the case, here are some suggestions.
1) Create your Stimulus slide and place both images on
it in the location you would like for them to go.
2) Set the duration of the Slide to the maximum you
want the longest image to be presented.
NOTE: At this point, both images will be presented for
the same duration.
3) Set the PreRelease on the Stimulus Slide to be the
exact same as the duration. This will allow for the
InLine to process the effective durations.
4) Create an InLine object just after the Stimulus
slide and place the following code. What this code
will do is spin in a loop for the total duration of
the Stimulus Slide. During that loop, you can
determine when 1000 ms has elapsed and then clear the
image you only want to display for 1000.
'NOTE: search and replace Stimulus for the name of
your slide object. The image objects are assumed to
be named Image1 and Image2, which can be changed in
the interface and this script to accomodate more
custom names.
Dim bClearImage As Boolean
bClearImage = False
While Stimulus.InputMasks.IsPending()
'Have we cleared the Image
If Not bClearImage Then
'Is it time to clear the Image?
If Clock.Read >= Stimulus.OnsetTime + 1000 Then
'Get a reference variable to the slide Image
Dim theSlideImage As SlideImage
Set theSlideImage =
CSlideImage(Stimulus.States(Stimulus.ActiveState).Objects("Image2"))
If Not theSlideImage Is Nothing Then
'With the cooridnates of the slide Image
' we paint over the area
Display.Canvas.PenWidth =
theSlideImage.BorderWidth
Display.Canvas.PenColor =
theSlideImage.BorderColor
Display.Canvas.FillColor = theSlideImage.BackColor
Display.Canvas.Rectangle theSlideImage.Left,
theSlideImage.Top, theSlideImage.Right -
theSlideImage.Left, theSlideImage.Bottom -
theSlideImage.Top
'Set the flag so we don't clear it again
bClearImage = True
End If
End If
End If
'Give some time back
Sleep 10
DoEvents
Wend
If you are collecting responses during this time, make
sure the EndResponseAction is none, because jump or
terminate will actually terminate the next object in
the procedure.
If you are not collecting any responses, then you will
need to change the first line (while...) to While
Clock.Read < Stimulus.OnsetTime + Stimulus.Duration
-Brandon
>>> I have a question regarding the "slide" object in
>>> eprime. I would like
>>> to present two different stimuli together with >>>
the slide object, but
>>> for differing amounts of time. For example,
>>> picture A is presented for
>>> 1 second, and picture B is presented for 5
>>> seconds. Is it possible for
>>> these two pictures to be presented with the same
>>> slide object but on
>>> different time courses? Thanks!
>>>
>>> -Kate Shannon
>>>
>>> University of Washington
>>> Department of Psychology
>>> Box 35152 Seattle, WA 98195 <<<
>>>
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
More information about the Eprime
mailing list