Release response as input for HitTest

Maja Maja.Stegenwallner at gmx.de
Tue Nov 22 18:21:10 UTC 2011


Hi,

thanks for the suggestion! I think the problem is solved, so I post
the code for anyone, how might have the same question. Note that this
is a modification of the code obtained from the click and drag sample
of the E-prime support provided on pstnet.com.

All the best,
Maja
---------------------

Set theState = Stimulus.States("Default")

'Declare a variable for holding the name of the object on which the
dragged object is released.
Dim strGoal As String
strGoal = ""


	'Determine string name of SlideImage or SlideText object at mouse
realease coordinates. Assign that value to strHit
        'Here the coordinates of the mouse release response, Drag1.X
and Drag1.Y equal the final mouse coordinates from using HitTest to
implement the Drag function.
	strGoal = theState.HitTest(Drag1.X, Drag1.Y)

		'Compare string name where mouse click occurred to CorrectAnswer
attribute
		'and score response.

		If strGoal = c.GetAttrib("CorrectAnswer") Then
		     Object2.ACC = 1
		Else
		     Object2.ACC = 0

End If

'Release references to objects that will not be used beyond this
point.
Set theMouseResponseData = Nothing
Set theState = Nothing

------------------------

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list