Hi,
Is it possible to use dynamic object names?
My app has 7 different buttons. Each button has an “off”, “on” and a “standard” status. Every status uses another image.
I would like to create one function with which you can change the state of every button.
One button has 3 objects, for example:
button1_standard
button1_on
button1_off
I want a function like this:
[lua]function changeButtonStat(isOn, buttonName)
if isOn then
[buttonName … “_on”].isVisible = true
[buttonName … “_off”].isVisible = false
else
[buttonName … “_on”].isVisible = false
[buttonName … “_off”].isVisible = true
end
end[/lua]
The function call should look like this:
[lua]changeButtonStat(true, “button1”)[/lua]
Please help me! I’m actually a Flash programmer and I know in Flash it’s easy to do this. I cannot imagine that it’s not possible with lua.
Thanks a lot!
Vincent [import]uid: 50639 topic_id: 16331 reply_id: 316331[/import]
