event.sprite table issue

Hello!

I have a tricky problem, a challenge for the pro's here:

I have a table that holds the handles to my LaserBeam sprites :-) As elements of this table, these laserbeams all have handles like LaserBeam[1], LaserBeam[2] etc... Now, whenever one of these laserbeams ends its animation, it sends a sprite event named "end".

The listener for this sprite event can call event.sprite to say which sprite sent out this event. The problem is, apparently all I get is a table number when I do this - probably the table number of table LaserBeam.

Is there any way to get to know the very specific LaserBeam, and not just the table?

Thx,
Thomas

What is this in aid of?

You could add a .name property to the lasers to return the actual name you set.

Peach :)

views:1398 update:2011/11/2 21:34:51
corona forums © 2003-2011