Repeat loop test

Colin Holgate coiin at rcn.com
Sun May 17 14:37:02 EDT 2009


On May 17, 2009, at 2:07 PM, barryb at libero.it wrote:

> OK, here is the question.
> What should I do to attain the required
> results as described?


Try this:

on mouseUp
    put empty into balls
    repeat with x = 1 to the number of images of this card
       if "ball" is in the name of image x then put the name of image  
x & return after balls
    end repeat
    repeat with x = 1 to the number of lines in balls
       put line x of balls into thisball
       set the layer of image thisball to bottom
       wait for 3 ticks
       set the loc of image thisball to the harbour of image thisball
       set the layer of image thisball to top
       wait for 3 ticks
       move image thisball to the berth of image thisball
    end repeat
end mouseUp






More information about the use-livecode mailing list