# Creating layers through actionscript 3 code

**URL:** <https://forum.kirupa.com/t/creating-layers-through-actionscript-3-code/278829>\
**Category:** flash\
**Created:** [January 6, 2009, 12:43pm UTC](https://forum.kirupa.com/t/creating-layers-through-actionscript-3-code/278829 "2009-01-06T12:43:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![OML](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@OML](https://forum.kirupa.com/u/OML)\
**Post date:** [January 6, 2009, 12:43pm UTC](https://forum.kirupa.com/t/creating-layers-through-actionscript-3-code/278829/1 "2009-01-06T12:43:03Z")

</div>

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
