So here's my problem. I am working on some Lua code using Corona SDK, for an iPhone app. I have narrowed the problem down to a few lines of code, that, if made to work, can point me in the right direction for the actual code. ( Plus, posting the original code will only make this post longer :P). So here goes:
local square = display.newRect( 0, 0, 100, 100 ) square:setFillColor( 255,255,255 ) local function move(event) transition.to( self, { time=1500, alpha=0, x=100, y=100 } ) end Runtime:addEventListener("enterFrame", move)
Basically, the problem is that the transition.to( ) method does not work in a function that has an "enterFrame" listener. If I change the listener on the last line to
timer.performWithDelay( )
or even
Runtime:addEventListener( "touch", method)
it suddenly works.
I have no idea what I am missing. Can anyone help?