# AS2: Reload frame on collision with wall?

**URL:** <https://forum.kirupa.com/t/as2-reload-frame-on-collision-with-wall/274874>\
**Category:** programming\
**Created:** [November 6, 2008, 2:00am UTC](https://forum.kirupa.com/t/as2-reload-frame-on-collision-with-wall/274874 "2008-11-06T02:00:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shred49](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@Shred49](https://forum.kirupa.com/u/Shred49)\
**Post date:** [November 6, 2008, 2:00am UTC](https://forum.kirupa.com/t/as2-reload-frame-on-collision-with-wall/274874/1 "2008-11-06T02:00:58Z")

</div>

ok, so i am making one of those games where the mouse has to manouver through the maze or whatever, and i can’t seem to get the code so that when the mouse hits the wall of the border of the 550x600 screen, the frame reloads. The frame set-up is a frame before it called “title screen”, then the frame the mc “ball” and the mc “maze” are on called “lv1” and then its a frame called “lv2”. I’ve done many hitTest’s before this one and have never had any major problems. but why isnt this one working?

```auto
 onClipEvent(load){
                if(_root.ball.hitTest(_root.maze)){
                       gotoAndPlay("lv1");
               }
        }

```

thoughts?
