There is an button example coming with the installation: for windows: C:/Program Files/Gideros/Examples/Graphics/Button for mac: /Applications/gideros ..../Examples/Graphics/Button
It contains a generic button class (button.lua) for everyday use. You can look at main.lua to understand how to use it.
------------------------------------------------
To change (or animate) the sprite image, you have 3 options:
1. removeChild the old bitmap and addChild the new bitmap. Bird Animation example demonstrates this method. 2. add all bitmaps as children and call setVisible(false) for all of them then setVisible(true) for the bitmap you want to display. 3. Use the MovieClip class. Assume that you have 3 frames. Construct a MovieClip as:
local mc = MovieClip.new{{1, 1, frame1},
{2, 2, frame2},
{3, 3, frame3},
}
and use MovieClip:gotoAndStop(frame) function to go to a specific frame.
Comments
There is an button example coming with the installation:
for windows: C:/Program Files/Gideros/Examples/Graphics/Button
for mac: /Applications/gideros ..../Examples/Graphics/Button
It contains a generic button class (button.lua) for everyday use. You can look at main.lua to understand how to use it.
------------------------------------------------
To change (or animate) the sprite image, you have 3 options:
1. removeChild the old bitmap and addChild the new bitmap. Bird Animation example demonstrates this method.
2. add all bitmaps as children and call setVisible(false) for all of them then setVisible(true) for the bitmap you want to display.
3. Use the MovieClip class. Assume that you have 3 frames. Construct a MovieClip as:
http://www.giderosmobile.com/documentation/reference_manual_2011.9.html#MovieClip