Problems with spritesheets.

Hi there.
I’m having serious problems getting a sprite sheet working on a device ( ipad 1 )
My app works perfectly on corona and ios simulators but when i deploy onto a device i get this error

Director ERROR : Failed to execute new ( params ) function on ‘home’

This makes no sense as it works perfectly on both simulators and when i check the console in xcode it says this

Nov 18 17:40:22 unknown UIKitApplication:com.dit[0xd876][3845] : Lua Runtime Error: lua_pcall failed with status: 2, error message is: (null) >

Everything else works on the device, navigation and pop ups etc but as soon as i load in a sprite everything stops working.

here is my code:

MAIN.LUA

display.setStatusBar( display.HiddenStatusBar )
local director = require(“director”)
local mainGroup = display.newGroup()
local ui = require ( “ui” )
local main = function ()
mainGroup:insert(director.directorView)
director:changeScene(“home”)

return true
end
main()
HOMEPAGE

module(…, package.seeall)
new = function ( params )
local ui = require ( “ui” )

local localGroup = display.newGroup()
local background = display.newImage( “Graphics/Background/home_bkgrd_txt2.jpg” )
local graphicpine = display.newImage(“graphics/Buttons/graphic_btn.png”)

--====================================================================–
– SPRITE
--====================================================================–

require “sprite”
sheet = sprite.newSpriteSheet(“Graphics/animations/indoor_1.png”, 245, 136 )
spriteSet = sprite.newSpriteSet(sheet, 1, 75) --1 - 15 is saying your running through the sprites
sprite.add( spriteSet, “man”, 1, 75, 300, 1)


graphicpine.x = 928.919
graphicpine.y = 114.212
myMan = sprite.newSprite(spriteSet)
myMan.x = 293.235
myMan.y = 430.534
myMan.isVisible = false

function clickedRect2(event)
myMan:prepare(“man”)
myMan:play()
myMan.isVisible = true
end

graphicpine:addEventListener(“tap”, clickedRect2)

--------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------

local initVars = function ()




localGroup:insert( background )
localGroup:insert ( graphicpine )
localGroup:insert ( myMan )



end

------------------
– Initiate variables
------------------

initVars()



return localGroup

end


i keep getting the this error message
Director ERROR : Failed to execute new ( params ) function on 'home’

and i dont see why its doing this.
any help would be greatly appreciated.

Rich
[import]uid: 155893 topic_id: 33114 reply_id: 333114[/import]

Use storyboard instead. I had lots of problems with director class with my last project. Storyboard is clean and much more stable. [import]uid: 12704 topic_id: 33114 reply_id: 131492[/import]

thanks for the feedback.
would you have a basic storyboard example i can work with?
the sample code example on corona is too hard to break down.
regards
rich [import]uid: 155893 topic_id: 33114 reply_id: 131508[/import]

Use storyboard instead. I had lots of problems with director class with my last project. Storyboard is clean and much more stable. [import]uid: 12704 topic_id: 33114 reply_id: 131492[/import]

thanks for the feedback.
would you have a basic storyboard example i can work with?
the sample code example on corona is too hard to break down.
regards
rich [import]uid: 155893 topic_id: 33114 reply_id: 131508[/import]