From a current screen, how do you load images from another file?
Below is sample code that would show what I am doing wrong!
Main screen: screen1.lua
module(..., package.seeall)
-------------------------------------
-- LOAD PACKAGES
-------------------------------------
local physics = require("physics")
local ui = require( "ui" )
local introparts = require( "intro-parts" )
physics.start()
-------------------------------------
-- NEW
-------------------------------------
function new()
--Local Group
local localGroup = display.newGroup()
--Calling Parts
parts()
return localGroup
end
Parts: intro-parts.lua
[code]
function parts()
local localGroup = display.newGroup()
box1 = display.newImage(“images/box1.png”, 422, 254)
physics.addBody( box1, { density=5.0, friction=0.3, bounce=0.4 } )
localGroup:insert(box1)
end
[/code] [import]uid: 7197 topic_id: 5004 reply_id: 305004[/import]