Can I collide from two separate functions?

Hi, Im getting along quite well with corona but Im stumped on collisions etc.

I have the following code to spawn bullets and enemy ships, they are in 2 separate functions and from looking at the collision help, it seems like objects you want to collide must be created in the same function. Im new to corona so I might be completely wrong. If anyone can help please do!

function fire()
local bullet = display.newCircle( ship.x, ship.y, 3 )
gamescreen:insert( 2, bullet )
laserchannel = audio.play( laser )
transition.to(bullet, { time = 500, x = centreX, y = centreY, width = 0.25, height = 0.25, onComplete = destroyHoop } )
end

function spawnobst(event)
if dospawnE == 1 then
Enemylane = mRand(1,2)
local ship = display.newImage(“shipafterburner.png”)
gamescreen:insert( 1 , ship )
ship.alpha = 0.2
ship.xScale = 0.01
ship.yScale = 0.01
ship.x = centreX
ship.y = centreY

I have skipped some bits of code as it would be a big post, but is there anyway of making a bullet in the first function collide with the ship in the second function?

Thanks [import]uid: 8699 topic_id: 5420 reply_id: 305420[/import]

by this I mean,

I have a fire button which runs the fire function, this spawns a bullet.

I also have a timer which runs the spawnobst funtion, this spawns an enemy ship. Is there a way to have the bullet destroy the ship? I don’t need any collisions as in physical, just a signal to say to destroy both objects.

Thanks
[import]uid: 8699 topic_id: 5420 reply_id: 18175[/import]