[font=Arial]I am trying to create a very simple “drag-and-drop move to the next frame” movie. I have searched the forums and tried a number of things, but to no avail.
I have a three frame movie. The first two frames loop with a movie clip of a BALL and a movie clip of a HOOP. Frame 2 has an action of gotoAndPlay(1); to create the loop. When the user “grabs” the BALL via this hitTest, I want the movie to advance to Frame 3 when BALL goes into the HOOP.
The BALL is on its own layer with the following code:
onClipEvent (load) {
_x = 78;
_y = 163;
speed = 1;
}
onClipEvent (enterFrame) {
if (hitTest (_root._xmouse, _root._ymouse, true)) {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX - _x) / speed;
_y += (endY - _y) / speed;
}
}
The HOOP movie is on its own layer with the following code:
onClipEvent (enterFrame) {
if (_root.hitTest(_root.ball)) {
_root.gotoAndPlay(3);
}
}
This doesn’t work at all. When the HOOP code is in movie, the BALL script doesn’t work. When I remove the HOOP script, the BALL moves around as it should.
I’ve tried putting the movies on the same layer–no good. Adding a stop(); command in place of the loop–no good. Switching layer order–no good.
Any help or alternatives would be appreciated.
Woody[/font]