passing a display group as a parameter

Hi

I have a function A that creates a display object with an event listener attached. Function A also creates a display group.

The listener for the display object in A removes the display group in A and calls function B.

I have another function C that creates a different display group and also has an object with a listener.

This listener removes group C and also calls function B.

So right now I have two listeners doing essentially the same thing: removing a display group and calling function B. is there a way to pass the display group as a parameter so I can do this with only one listener?

thanks,

DavidĀ