I have not tested my suggestions below but by looking at the API briefly I have discovered these properties:
You can obtain a Layers object from your Document object, which you can then obtain a Layer by name using getByName(name).
As for the opacity, try calling fillOpacity() once you have obtained your Layer object by name.
Hope that helps,
Thanks Joe but I don't think that is the answer:
I believe that the function getByName(name) is for selecting a layer by name, not for getting the selected layer's name, and the fillOpacity() function is for setting or reading the Fill opacity, not the layer opacity.
Apologies for misunderstanding your question.
Thanks Joe, that is almost right... no need for the brackets:
var name:String = docRef.activeLayer.name;
var opacity:Number = docRef.activeLayer.opacity;
Thanks for pointing me in the right direction.