Thanks, Sean Wilson. I plugged in your suggested code and, though I don't exactly understand it, it worked just fine. Thanks Paul > - -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Paul Schulman > Sent: Wednesday, September 05, 2001 1:18 PM > To: [EMAIL PROTECTED] > Subject: <lingo-l> loop question > > > No one answered my question so I'll ask again--more briefly. > I have a project in which I am trying to have > people look at a cross on the screen and > then when they press a key, a spot (sprite(1)) is > presented in any one of five locations on the screen. > The locations are stored in a list and a repeat loop > goes through the list. Each time, I want the cross to > appear first and I want the viewer must press a key > before the spot appears. I want this whole thing to > happen 5 times�so they see 25 spots. > Here�s the relevant code: > > on numTimesThroughList > repeat with listLength = 1 to count(newDistanceList) > sprite(1).loc = getAt(newDistanceList,listLength) > keepTime > go to "fixation" --This is the cross; it's in > - --another frame. > end repeat > end > > - - --This determines how long the spot will appear > on keepTime > startTimer > repeat while the timer < 20 > go to the frame > end repeat > end > > > What actually happens is that the first time, the > program lets me see the fixation cross and press any > key. Then the spot appears where I�d like it to, but > then things go wrong: the repeat loop goes through the > rest of the list (1) without going back to the > fixation point, (2) without allowing me to press any > key and (3) without displaying the spot in thosefour > other locations. The last handler (on > countTimesThroughList) repeats the whole thing 5 > times. I couldn�t get this handler to work in a > repeat loop either�though I thought it was possible. > > So, what am I doing wrong? Thanks. > Paul > > > [To remove yourself from this list, or to change to digest mode, go to > http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, > email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) > Lingo-L is for learning and helping with programming Lingo. Thanks!] > > > > [To remove yourself from this list, or to change to digest mode, go to > http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, > email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) > Lingo-L is for learning and helping with programming Lingo. Thanks!] > > ------------------------------ > > End of Lingo-L Digest V1 #2140 > ****************************** [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
