As a hobbyist/beginner I know when I'm looking around for answers to help me do better, I always learn lots from the experts on here.
I thought it would help me and others looking for answers to fairly basic coding techniques if we posted snippets of code
and asked the experts to show us ways of making the snippet better, shorter, faster so that we can learn more and code faster.
Here is one snippet that works but maybe could be more efficient, ( or is this the best way to do it? ) I don't know, any advice please?
Kind regards, Jon
Code: Select all
command mveDice
//Move all dice back to sleep position
doHideDiceScores
doHideScores
set the disabled of group "visButs" to true
set the visible of image "dice1.jpg" to false
set the Loc of image "dice1.jpg" to 402, - 20
set the visible of image "dice2.jpg" to false
set the Loc of image "dice2.jpg" to 402, - 20
set the visible of image "dice3.jpg" to false
set the Loc of image "dice3.jpg" to 402,- 20
set the visible of image "dice4.jpg" to false
set the Loc of image "dice4.jpg" to 402, - 20
set the visible of image "dice5.jpg" to false
set the Loc of image "dice5.jpg" to 402, - 20
set the visible of image "dice6.jpg" to false
set the Loc of image "dice6.jpg" to 402, - 20
set the visible of image "dice11.jpg" to false
set the Loc of image "dice11.jpg" to 402, - 20
set the visible of image "dice21.jpg" to false
set the Loc of image "dice21.jpg" to 402, - 20
set the visible of image "dice31.jpg" to false
set the Loc of image "dice31.jpg" to 402, - 20
set the visible of image "dice41.jpg" to false
set the Loc of image "dice41.jpg" to 402, - 20
set the visible of image "dice51.jpg" to false
set the Loc of image "dice51.jpg" to 402,- 20
set the visible of image "dice61.jpg" to false
set the Loc of image "dice61.jpg" to 402, - 20
end mveDice