joystick response & looming videos

David McFarlane mcfarla9 at msu.edu
Tue Jul 3 19:52:00 UTC 2012


Terhi,

Interesting problem.  I do n0t see any way to change the ActiveState 
of a FeedbackDisplay object using inline code, FeedbackDisplay 
objects are not meant to do that.  And if you look at the generated 
code, you will see why -- the FeedbackDisplay object always generates 
its own .ActiveState code just before it runs, based on the specified 
Input Object, and that code overrides any inline code that you place 
before it.  If you want control of Slide States (FeedbackDisplay is a 
specialized Slide), then you should just use a multiple-state Slide 
object instead of a FeedbackDisplay, and then you could control the 
state of the Slide very nicely with an attribute reference in its 
ActiveState property.

As for your second question about making looming videos by modifying 
the earlier instructions...  Those instructions seem pretty clear to 
me, and it would be trivial to try that out with a video.  So go try 
the exercise yourself and then report back here with the results.  Thanks.

-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (twitter.com/EPrimeMaster)

/----
Stock reminder:  1) I do not work for PST.  2) PST's trained staff 
take any and all questions at 
http://support.pstnet.com/e%2Dprime/support/login.asp , and they 
strive to respond to all requests in 24-48 hours -- this is pretty 
much their substitute for proper documentation, so make full use of 
it.  3) In addition, PST takes questions at their Facebook page 
(http://www.facebook.com/pages/Psychology-Software-Tools-Inc/241802160683 
), and offers several instructional videos there and on their YouTube 
channel (http://www.youtube.com/user/PSTNET ) (no Twitter feed yet, 
though).  4) If you do get an answer from PST staff, please extend 
the courtesy of posting their reply back here for the sake of others.
\----


At 6/29/2012 08:01 AM Friday, terhi helminen wrote:
>I am trying to create an experiment, where a subjects have to answer 
>to a movie stimuli by moving a joystick backward or forward. 
>According the subjects response, the video should loom bigger 
>(backward movement)  or smaller (forward movement).
>
>I thought I could do this by using a feedback object: forward 
>movement could be coded as correct answer and backward movement as 
>wrong answer. And a feedback for correct answer could be a video 
>looming smaller and for incorrect answer there could be a video 
>looming bigger.
>
>I have already added a joystick device to the experimental design, 
>and using an inLine object I inserted a script  to decode the 
>movement of the joystick as response, and that works alright. (I 
>found the script from this forum 
><https://groups.google.com/forum/#!searchin/e-prime/joystic/e-prime/cu8Fm6lbE_I/JcZaf_ORhk8J>https://groups.google.com/forum/#!searchin/e-prime/joystic/e-prime/cu8Fm6lbE_I/JcZaf_ORhk8J 
>... I even use the same joystick!)
>
>Dim nInitY As Integer
>Dim nCurrentY As Integer
>Dim nDiff As Integer
>
>nInitY = Joystick.CursorY
>
>Do
>    nCurrentY = Joystick.CursorY
>    nDiff = nInitY - nCurrentY
>
>Loop Until Abs(nDiff) > 50
>
>Stimulus.RTTime = Clock.Read
>Stimulus.RT = Stimulus.RTTime - Stimulus.OnsetTime
>
>If nDiff > 0 Then
>    Stimulus.RESP = "Forward"
>Else
>    Stimulus.RESP = "Backward"
>End If
>
>However, I don't know how to make the program to understand the 
>forward movement as "Correct" answer. I tried to write another 
>inLine script with my minor programming skills without success:
>
>     If Stimulus.RESP = "Forward" Then
>         'Set the ActiveState to Correct
>         Feedback.ActiveState = "Correct"
>         End If
>
>     If Stimulus.RESP = "Backward" Then
>         'Set the ActiveState to Incorrect
>         Feedback.ActiveState = "Incorrect"
>
>         End If
>
>Could you help me with that?
>
>Another questions concerns the looming videos: I found that it would 
>be possible to create looming pictures with a script 
>(<https://groups.google.com/forum/#!searchin/e-prime/joystick/e-prime/qD0NwsXD7i4/bk1hMejJ3u8J>https://groups.google.com/forum/#!searchin/e-prime/joystick/e-prime/qD0NwsXD7i4/bk1hMejJ3u8J 
>), but do you know if that's possible with video stimuli?
>
>Thanks in advance,
>Terhi

-- 
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