Creating layers through actionscript 3 code

Hello,

I want to take a simple empty project, and create three layers through action script code. Is that possible?

Since I am creating an application where I add and remove objects quite frequently, I would like to have a layer where I can place all my GUI controls (buttons etc…). I need my buttons to always stay in front of all the objects that I add and remove from the background.

I thought about using transparent containers as layers, but I have a feeling that there’s a much simpler method of doing this.

Thanks,
OML