The following codes makes a screen capture every second (I use fps = 30):
local counter = 0 local function onEnterFrame(event) counter = counter + 1 if counter%30==0 then display.captureScreen(true) end return true end function scene:enterScene(event) local group = self.view Runtime:addEventListener("enterFrame", onEnterFrame) end scene:addEventListener("enterScene", scene)
The first screen shot is fine. Then, with every further shot, the image moves a bit (1 pixel?) to the left and is kinda overlaying with the image saved before. After just a few seconds, the screen output on the simulator stops completely although the images are still saved (and still get more blurry).
I thought I could use this function to save screen shots continuously and then turn them into a movie.
SDK 2013.1225