Hi everyone.
I was trying to zoom an ImageGroup in my game with transition.to but only got weird results so I set up this test project to demonstrate my problems, maybe anyone can tell me what I am doing wrong?
local group = display.newGroup()
local rect1 = display.newRect(100, 100, 100, 100)
group:insert(rect1)
function shrink()
group.width = 50
group.height = 50
end
function inflate()
group.width = 200
group.height = 200
end
function transitionShrink()
transition.to(group, { time = 3000, width = 50, height = 50 } )
end
timer.performWithDelay(3000, shrink)
timer.performWithDelay(6000, inflate)
timer.performWithDelay(9000, transitionShrink)
The shrink() and inflate() functions work now. transitionShrink() however, shrinks the group until it is no longer visible. Thus, I have 2 questions
- When I debug my program, the width/height will always be 100, no matter what I set this to. Is this normal?
- To to correctly apply the transition? [import]uid: 139365 topic_id: 30195 reply_id: 330195[/import]