Hi Anne!<br><br>Thank you very much for the fast reply. You are awesome!!!<br><br>For my experiment, I want to have the subjects only be able to click on the two buttons. So when they accidentally clicks something else (e.g. another image object or simply anywhere on the screen other than the two buttons), nothing would happen. Once they successfully clicks one of the two buttons, the game trial will then restart and go to begingame (a label in the beginning of the trialproc).<br><br>So I used your code and edited it to make it work.<br><br>Here are the working codes, maybe other new eprime users like me can benefit from this.. :D<br><br>================================================<br><br>'Designate "theState" as the Default Slide State, which is the<br>' 'current, ActiveState on the Slide object "Stimulus"<br><br><br> Dim theState as SlideState<br> Set theState = Slide5.States("Default")<br><br> Dim next_mX as Long, next_mY as Long<br> Dim strHit As String<br> Dim theMouseResponseData As MouseResponseData<br><br><br> 'Was there a response?<br> If Slide5.InputMasks.Responses.Count > 0 Then<br><br> 'Get the mouse response<br> Set theMouseResponseData = CMouseResponseData(Slide5.InputMasks.Responses(1))<br> <br> 'Determine string name of SlideImage or SlideText object at<br> 'mouse click coordinates. Assign that value to strHit<br> strHit = theState.HitTest(theMouseResponseData.CursorX, theMouseResponseData.CursorY)<br><br> 'if strHit equals the two buttons, then strHit will be logged, game will move onto next trial.<br> <br> If strHit = ("leftbutton") or strHit = ("rightbutton") Then<br> c.SetAttrib "response", strHit<br><br> 'if click is off, then restart slide 5 so nothing changes on the screen. no data will be logged in this case. <br><br> Else<br> Goto restart<br><br> End If <br> End if<br><br><br><br><br>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/txb4WKMIdB0J">https://groups.google.com/d/msg/e-prime/-/txb4WKMIdB0J</a>.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.<br />
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.<br />