I have 100 squares and I would like them to be arranged in rows of 10 to create a
large square from the 100 small squares. I have a button that randomized the order of them however at the moment I can only achieve a single row of 100 images rather than the ten rows of ten.
Also - as an extra bit, If each square is named "square1" up to "square100" is there a way to have button that will arrange the squares in order counting up to 100?
Here is the script I am using at the moment:
Code: Select all
on mouseUp
lock screen --for visual effect
repeat with y = 1 to 100
put y into line y of temp
end repeat
sort temp by random(10000)
put the width of image "nebula3_1" into tW
put the width of image "nebula3_1" into tH
repeat with y = 1 to 100
put (line y of temp) into s
--put 0,0 into tLoc
put (s-1)*tW into item 1 of tLoc
put (the height of this card/3) into item 2 of tLoc
set the loc of image ("nebula3_" & y) to tLoc
end repeat
unlock screen --with visual effect dissolve very fast
end mouseUp