Changing image position according to xy-coordinates from mouseclicks
Johannes Bjerva
johannesbjerva at gmail.com
Tue Jun 19 07:48:41 UTC 2012
I managed to solve the problem through using a global variable, which is
set by the mouse coordinates, rather than an attribute.
That is to say, the problem was not in the automatic addition of ":center",
as I first assumed.
Problem solved! :)
On Monday, 18 June 2012 21:53:18 UTC+2, Johannes Bjerva wrote:
>
> 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/-/MitsRbQr7NgJ.
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/20120619/5e19c10b/attachment.htm>
More information about the Eprime
mailing list