I'm trying to get an object's background colour to 'flash' and can achieve this with a 'wait' command as below:
Code: Select all
on mouseup
put "red, orange, yellow, green, blue, violet" into vColors
repeat for each item x in vColors
set backcolor of graphic 1 to x
wait .5 seconds
end repeat
end mouseup
I've read that I need to use a 'send' command instead and have tried various permutations but failed so far to achieve a flash effect with 'send'!
Code: Select all
-- this doesn't work!
on mouseup
flash
end mouseup
on flash
put "red, orange, yellow, green, blue, violet" into vColors
repeat for each item x in vColors
set backcolor of graphic 1 to x
end repeat
send "flash" to me in .5 seconds
end flash
Regards,
Glenn