Well, I see one problem - you need a break in your enterframe code, or it will run on forever. You need an }else{ in there, with a delete this.onEnterFrame;