z0mg... don't panic!!
Hi "Pierre,
I you found the dohittest example you're nearly there! Implement it in
an inline after the slide that you want to record the response to, do
adjust the code to actually read the slide that you want it to read
from (see caps in stringhitcode pasted below). Also: in your triallist
create an attribute called 'Correctresp' in which you enter the
filename of the .jpg that is the correct answer for each level.
***********
'Designate "theState" as the Default Slide State, which is the
'current, ActiveState on the Slide object "Stimulus"
Dim theState as SlideState
Set theState = ENTERNAMEOFSLIDEHERE.States("Default")
Dim strHit As String
Dim theMouseResponseData As MouseResponseData
'Was there a response?
If ENTERNAMEOFSLIDEHERE.InputMasks.Responses.Count > 0 Then
'Get the mouse response
Set theMouseResponseData =
CMouseResponseData( ENTERNAMEOFSLIDEHERE.InputMasks.Responses(1))
'Determine string name of SlideImage or SlideText object at
'mouse click coordinates. Assign that value to strHit
strHit = theState.HitTest(theMouseResponseData.CursorX,
theMouseResponseData.CursorY)
'Compare string name where mouse click occurred to CorrectAnswer
'attribute on each trial, and score response
'NOTE: This comparison is case sensitive
If strHit = c.GetAttrib("Correctresp") Then
Stimulus.ACC = 1
Else
Stimulus.ACC = 0
End If
End If
c.SetAttrib "response", strHit
*********
Do report back whether or not that solves your problem :)
Best,
liw