I'm trying to view animation after click the button but i'm doing something wrong
exit = Bitmap.new(Texture.new("5.png"), true)
exit:setPosition(250, 200)
stage:addChild(exit)
local frames = {}
frames[1] = Bitmap.new(Texture.new("komiks1.png"))
frames[2] = Bitmap.new(Texture.new("komiks2.png"))
local mc1 = MovieClip.new{
{1, 10, frames[1]},
{10, 20, frames[2]},
}
mc1:setPosition(0,0)
stage:addChild(mc1)
mc1:setGotoAction(0,0)
mc1:gotoAndPlay(1)
local frames = 0
exit:addEventListener("click",
function()
click= frames+1
end)
Comments
https://github.com/gideros/Button
Try: