Is it possible to work with layers in actionscript?

Well, i was just browsing through the help file, and many functions seemed like they were replacement of layers, like say masking and such. But i was wondering is there any way to work with layers in actionscript, just actionscript?I mean, is it possible to create a instance of a mc, on a particular layer via actionscript?