Name of a Layer by script

Dear all,

Is it possible to know the name of a layer holding a specific instance using AS3?

I was checking “layer.name” but a layer number has to be specified in order to get the name.

Thanks in advance