# Control everything in a layer?

**URL:** <https://forum.kirupa.com/t/control-everything-in-a-layer/321077>\
**Category:** flash\
**Created:** [April 10, 2011, 1:20am UTC](https://forum.kirupa.com/t/control-everything-in-a-layer/321077 "2011-04-10T01:20:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheAwesomeDude](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@TheAwesomeDude](https://forum.kirupa.com/u/TheAwesomeDude)\
**Post date:** [April 10, 2011, 1:20am UTC](https://forum.kirupa.com/t/control-everything-in-a-layer/321077/1 "2011-04-10T01:20:09Z")

</div>

Hi!  
Is it able to control everything in a layer?  
Like if i have 2 boxes in a layer, and then i want to write some code like this:

"if(player.hitTestObject(buttom)) {  
MYLAYER.x -=1;  
}

What im trying so say is… Can I do a hitTestObject that moves everything in a layer?

EDIT: What im trying to say is… Can I control a layer like if it was a object?
