local options =
{
--required parameters
width = 573,
height = 637,
numFrames = 8,
}
local sheet1 = graphics.newImageSheet( “enemy1.png”, options )
local sequenceData =
{
name=“bird”,
start=1,
count=8,
time=300,
loopCount = 0, – Optional ; default is 0 (loop indefinitely)
loopDirection = “bounce” – Optional ; values include “forward” or “bounce”
}
local instance1 = display.newSprite( sheet1, sequenceData )
instance1.x = display.contentWidth / 2
instance1.y = display.contentHeight / 2
instance1.xScale = .1
instance1.yScale = .1
instance1:play()
This code works on the simulator, but not on the phone. I keep getting this error message from the phone:
" main.lua:23: bad argument #1 to ‘newSprite’ (ImageSheet expected, got nil)
please help