4 Replies Latest reply on Apr 26, 2007 8:45 AM by Webangel01

    Repeat Statement Troubles

      Hi all,

      Im trying to set up a statment and im not sure how to go about doing it.
      I want a win statement to appear when some images are in a certain place.
      The images are all 100 pixels between each other and the first one is at 50.
      At the moment im using:

      ---- if sprite(1).loch=50 and sprite(1).locv=50 and sprite(2).loch=150 and sprite(2).locv=50 then
      ---- member("label").text = string("you win")
      ---- end if

      This works fine but I want to add another seven sprites locations to it so thats another 14 - "sprite(1).loch=50"'s and that's a very long if statement!

      Can anyone come up with a repeat statement that might work? I've racked my brain trying to do it.