# Wierd Bug in AS2

**URL:** <https://forum.kirupa.com/t/wierd-bug-in-as2/313045>\
**Category:** programming\
**Created:** [August 18, 2010, 4:06pm UTC](https://forum.kirupa.com/t/wierd-bug-in-as2/313045 "2010-08-18T16:06:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blue\_falcon](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@blue\_falcon](https://forum.kirupa.com/u/blue_falcon)\
**Post date:** [August 18, 2010, 4:06pm UTC](https://forum.kirupa.com/t/wierd-bug-in-as2/313045/1 "2010-08-18T16:06:34Z")

</div>

hi flash developers :hugegrin:  
I’m a computer games development student, and currently I’m creating an action puzzle game using AS2 for my assignment

I design the game to be 1 level for 1 frame  
And I have a problem when connecting 1 frame to another frame

When I run the frame separately there was no bug, it works just fine  
But when I link it all together, I have a weird sound coming, sounds like “bzzzt”  
and suddenly my main hero disappear from the screen

So I have something like this:

frame 3:

if (ball.hitTest(goal)) {  
[//Mouse.removeListener](https://Mouse.removeListener)(con);  
onEnterFrame=null;  
gotoAndStop(4); //the position of the ball is recorded around goal  
}

frame 4:

ball.\_x=0;//reset the position of the ball  
ball.\_y=0;

I tried to debug this, and I traced the ball.\_x in onEnterFrame function  
and this is the result that I got

1.7  
514.25  
154285.2  
-34597890.2  
-107374182.4  
-107374182.4

such unbelievable numbers I have here  
If any of you have encountered this bug before please help me  
I can show you any part of my code if you need to see it, just ask for it  
Thank you very much
