I ran up this stack:
- -
Which contains this code in the cardScript:
Code: Select all
on arrowKey AK
switch AK
case "up"
set the backGroundPattern of grc "MRAVKA" to the id of img "antUP.png"
set the icon of btn "KOPCHE" to "antUP.png"
break
case "down"
set the backGroundPattern of grc "MRAVKA" to the id of img "antDN.png"
set the icon of btn "KOPCHE" to "antDN.png"
break
case "left"
set the backGroundPattern of grc "MRAVKA" to the id of img "antLF.png"
set the icon of btn "KOPCHE" to "antLF.png"
break
case "right"
set the backGroundPattern of grc "MRAVKA" to the id of img "antRT.png"
set the icon of btn "KOPCHE" to "antRT.png"
break
end switch
end arrowKey
To set the backGroundPattern of a graphic one uses:
to the id of img "WhatDyeCallit.png"
But to set the icon of a button uses: to "WhatDyeCallit.png"
without pointing out that "WhatDyeCallit.png" is an image.