I’m getting a runtime error-
[text]movieclip.lua:50: attempt to index field ‘?’
stack traceback:
[c]:?
movieclip.lua:50: in function ‘newAnim’
[/text]
from the following code-
local board3 = movieclip.newAnim( "imagesGame/board.png", "imagesGame/board2.png" )
game:insert( board3 )
board3.x = 575; board3.y = 200
board3.rotation = 1
physics.addBody( board3, { density=woodDensity, friction=0.5, bounce=0.2} )
board3.myName = "board"
--Lev 3
local rat1 = movieclip.newAnim{ "imagesGame/rat10001.png", "imagesGame/rat30001.png", "imagesGame/rat40001.png" }
game:insert( rat1 )
rat1.x = 430; rat1.y = 242
physics.addBody( rat1, { density=ratDensity, friction=0.5, bounce=0.2,shape=ratShape} )
rat1.myName = "rat"
Now if I change the board to below, it works fine. I have a couple of the rat movieclips and it works fine. I tried a couple of other images numbered like the rats too and get the same error.
local board3 = display.newImage( "imagesGame/board.png", true)
game:insert( board3 )
board3.x = 575; board3.y = 200
board3.rotation = 1
physics.addBody( board3, { density=woodDensity, friction=0.5, bounce=0.2} )
board3.myName = "board"
Any ideas? Or does movieclip only work with 1 set of images?
Thanks
Dan [import]uid: 78446 topic_id: 14562 reply_id: 314562[/import]