icon name usage
Posted: Tue Jul 12, 2016 10:20 pm
I'm understanding control of the image associated with a button using the icon ID:
on mouseUp
if the icon of me is 1060 then set the icon of me to 1061
else if the icon of me is 1061 then set the icon of me to 1060
end mouseUp
but not understanding how to utilize the icon name to do similar.
this errors out:
on mouseUp
if the name of the icon of me is "nnnyH-...i.jpg" then set the icon of me to "nnnnH-.....jpg"
else if the icon of me is "nnnnH-.....jpg" then set the icon of me to "nnnyH-...i.jpg"
end mouseUp
What am I not understanding?
Need help with scripting the change of a button's image by referencing its existing image name.

on mouseUp
if the icon of me is 1060 then set the icon of me to 1061
else if the icon of me is 1061 then set the icon of me to 1060
end mouseUp
but not understanding how to utilize the icon name to do similar.
this errors out:
on mouseUp
if the name of the icon of me is "nnnyH-...i.jpg" then set the icon of me to "nnnnH-.....jpg"
else if the icon of me is "nnnnH-.....jpg" then set the icon of me to "nnnyH-...i.jpg"
end mouseUp
What am I not understanding?
Need help with scripting the change of a button's image by referencing its existing image name.
