# AS3 Uneven Terrain Clamping

**URL:** <https://forum.kirupa.com/t/as3-uneven-terrain-clamping/328697>\
**Category:** flash\
**Created:** [June 7, 2012, 4:02pm UTC](https://forum.kirupa.com/t/as3-uneven-terrain-clamping/328697 "2012-06-07T16:02:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IgiveUp](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@IgiveUp](https://forum.kirupa.com/u/IgiveUp)\
**Post date:** [June 7, 2012, 4:02pm UTC](https://forum.kirupa.com/t/as3-uneven-terrain-clamping/328697/1 "2012-06-07T16:02:51Z")

</div>

Can anyone please show me a working .fla example of this?  
[http://flashcove.net/268/uneven-terrain-clamping-in-flash-games-as3/](http://flashcove.net/268/uneven-terrain-clamping-in-flash-games-as3/)

I have tried and tried but I cannot get this to work. I tried the code as is(with a little modification to fit my needs) and my hero would just bounce around on top of the bounding box. I figured this was because of hitTestObject only checking the bounding box so I used skinner’s class to check for the collision but it still won’t work. If anyone can show me how this is done I would be extremely grateful. Thanks :beer2:
