Changing image position according to xy-coordinates from mouseclicks
Johannes Bjerva
johannesbjerva at gmail.com
Mon Jun 18 19:53:18 UTC 2012
Hello,
I am currently developing an experiment in which the participants will
click an area of the screen, following which an image should appear in that
location.
What I have tried so far is having a slide object containing an image
object. In the image object's sub-property pages I've tried to set the X
and Y positions to the attributes "[PicPosX]" and
"[PicPosY]". However, once I click apply, E-Prime automatically changes
this to "[PicPosX]:center" and "[PicPosY]:center".
In order to get the coordinates themselves, I have added this inline-code
after the slide object:
Dim theMouseResponseData As MouseResponseData
Set theMouseResponseData = CMouseResponseData(Slide1.
InputMasks.Responses(1))
c.SetAttrib "PicPosX", theMouseResponseData.CursorX
c.SetAttrib "PicPosY", theMouseResponseData.CursorY
Obtaining the coordinates and setting the attributes seems to work
perfectly, since I can see the coordinates in the resulting data files.
However, the image does not change positions, but remains in the center
(most likely due to E-Prime's :center-addition to my attributes).
Any help in solving this problem would, of course, be greatly appreciated.
Kind regards,
Johannes Bjerva
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/H2dE96O9xH8J.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120618/3f99fee7/attachment.htm>
More information about the Eprime
mailing list