delete into a loop repeat
Posted: Thu Dec 10, 2015 11:04 pm
Hello,
i scroll image and when a image leaves the screen to the left, i delete him exept the floor but after delete i have a error to the line put the short name of image x into nomImage
i scroll image and when a image leaves the screen to the left, i delete him exept the floor but after delete i have a error to the line put the short name of image x into nomImage
Code: Select all
repeat with x=1 to the number of images of card "niveau 1"
put x & cr after message
put the short name of image x into nomImage
if not(nomImage contains "sun" ) and not(nomImage contains "sky" ) then
set the loc of image nomImage to (item 1 of the location of image x - 10), (item 2 of the loc of image x)
if not(nomImage contains "floor" ) then
if the right of image nomImage < 0 then
delete image nomImage
end if
end if
end if
end repeat