transition.to( ) doesn't work within a function and with a Runtime:addEventListener( “enterFrame”, method) listener in Corona / Lua
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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