Object related problem

Is there a away to use one object from one lua file to the other lua file?
eg.i have a file called bullet.lua where i have set all the bullet properties.Now what i want is to use this bullet in my level1.lua file.
Is this Possible? [import]uid: 107104 topic_id: 19543 reply_id: 319543[/import]

im using modular programming like this, its very simple and very efficient method
my otherfile.lua:
[lua]local Public = {} – this is table you need to store the function you need to pass into another file

local function foo()
local image = display.newImage(…)
end

Public.foo1 = foo

return Public[/lua]

and in main file you can call it like this:
[lua]local externalFunctions = require(“otherfile”)
local function1FromExternal = externalFunctions.foo1

function1FromExternal()[/lua]

its very simple [import]uid: 16142 topic_id: 19543 reply_id: 75468[/import]

Thanks for the Help…I got that but how to use this “image” to the other lua file so that we can use this "image " accordingly. [import]uid: 107104 topic_id: 19543 reply_id: 75476[/import]

All you have to do is require bullet.lua from any module, and you will have access to the same copy that already exists. Any module which requires bullet.lua will have access to the public functions, and will see (and be able to set) the same values.

http://developer.anscamobile.com/forum/2011/12/22/variables-modularized-programming
[import]uid: 22076 topic_id: 19543 reply_id: 75485[/import]

what I want is collision between ball and the ground.So ,i wrote a collision code
First of all I have called the projectile.lua function “newProjectile” where i have my ball named as bullet and my “line” is ground.But this is not working…whenevr the ball hits the ground it goes to the else condition.Please help??
[lua]projectile.newProjectile()
print(projectile.bullet.x)

function onCollision(event)
if event.phase == “began” and event.other.myName == “line” then
print (“axis”)
else
print(“I am in Else”)
end
end
projectile.bullet:addEventListener(“collision”, onCollision)[/lua]

any help please?? [import]uid: 107104 topic_id: 19543 reply_id: 75939[/import]