Troubleshooting issue with dropping ball into specific region and using gotoAndStop(1)
I am trying to drop "the ball" into a specific region. When the ball is in the specific region, I want the page immediately go to frame 1 using the command "gotoAndStop(1)". However, it is not working. Can someone please help me troubleshoot this issue? Thank you.
this.stop();
var root = this;
this.ball.addEventListener("pressmove", moveBall);
function moveBall(e) {
e.currentTarget.x= e.stageX;
e.currentTarget.y= e.stageY;
root.ball.alpha=0.5;
}
this.ball.addEventListener("pressup", dropBall);
function dropBall() {
root.ball.alpha = 1;
if (root.ball.x > 326.5 && root.ball.x < 543.5 && root.ball.y > 211.95 && root.ball.y < 376.7) {
root.ball.gotoAndStop(1);
root.ball.alpha = 0.2;
}
else {root.ball.gotoAndStop(0);}
}
When the ball is in the specific region, "root.ball.alpha = 0.2;" is work, but the page not go to frame 1.

