looping sounds

jessica jessica.mariano at gmail.com
Fri May 9 16:09:00 UTC 2008


James and David - you are BRILLIANT!! Thank you soooo much for taking
the time to help me!! Thank you, thank you, THANK YOU!!!!!!! Really, I
cannot thank you enough!!

There's just ONE more thing... sorry, I keep saying that, but once one
problem is fixed, another issue inevitably pops up that I have no idea
how to fix (which I guess is the nature of research... bah).

Now, I need the movie to play ONLY after a response. If there is no
response, how do I make the program continue on to the next trial,
without going straight to the movie?

So here's the basic set up:

- Start Screen (where you press a button to proceed to the trial)
- Sound 1
- Sound 2
- Movie

So, if there is no response to Sound 2, I need it to go back to the
start screen, skipping the movie, and proceeding with the rest of the
trial list.

I tried this code, trying to adapt what you all gave me:

If (toneCount <= 5) And (TrainingSound2.RESP <> "") Then
	Goto Label4 (where Label 4 was placed before the Start Screen)

Else
	toneCount = 0

End If

and it seemed to work, but if there was no response, the list just
kept on cycling over and over again, instead of moving through to the
end (i.e., if I had 3 trials, and there was no response on those 3
trials, the list wouldn't end, it just kept starting over again... but
if I responded on those 3 trials, then the list would end).

Does that make sense?

Many many thanks in advance!!

:)




On May 9, 10:31 am, David McFarlane <mcfar... at msu.edu> wrote:
> Jessica,
>
> At 5/9/2008 07:45 AM Friday, James Keidel wrote:
>
> >the order you need to test things is check whether there is a
> >correct response, and if there is not then you check the value of the
> >toneCount.
>
> Just to complete James' thought, here is the script (with a bit of
> rearangement, and adding comments):
>
> toneCount = toneCount + 1
> If (toneCount <= 5) And (TrainingSound2.RESP <> "{SPACE}"> Then
>     Goto Label2  ' repeat the training loop
> Else
>      toneCount = 0  ' reset counter for next time
>      Goto Label3  ' exit the training loop
> End If
>
> BTW, if the movie object immediately follows this inline script, then
> you shouldn't even need the final Goto.  Also, strictly speaking,
> since the first Goto jumps you out of the If ... Then, you don't even
> need the Else clause (although it may improve readability if you
> leave it in).  Putting all those together, the script might become simply:
>
> toneCount = toneCount + 1
> If (toneCount <= 5) And (TrainingSound2.RESP <> "{SPACE}"> Then
>      Goto Label2  ' repeat the training loop
> End If
> ' Training loop completed, reset counter for next time:
> toneCount = 0
> ' And move on to the movie ...
>
> But now I'm getting too pedantic.
>
> -- David McFarlane, Professional Faultfinder
--~--~---------~--~----~------------~-------~--~----~
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