Hi – I have made up a snakes and ladders drag and drop board to use with interactive whiteboard in my class. It is only 2 frames, one with the intro and the other with the board.
The squares with snakes or ladders are movieclips (target1, target2 etc). The contestant images are movieclips. Which drag and drop, when they hit the target they move.
It was working fine, but now every time I test it I get the following error message. I don’t know how to solve it as I have looked everywhere.
Scene=Scene 1, Layer=Layer 1, Frame=2: Line 1: Statement must appear within on/onClipEvent handler
stop();
I’ll try to attach the fla but last time it didn’t work, so I’ll give some of the code below.
On the 2nd Frame I have stop();
On each contestant movieclip I have
on (press) {
_root.player2.startDrag();
_root.player2.swapDepths(100);
}
on (release) {
_root.player2.stopDrag();
if (_root[“player2”].hitTest(_root[“targetone”]))
_root.player2._y -=80;
if (_root[“player2”].hitTest(_root[“targettwo”]))
_root.player2._y -=80;
if (_root[“player2”].hitTest(_root[“targetthree”]))
_root.player2._x +=90,_y +=80;
if (_root[“player2”].hitTest(_root[“targetfour”]))
_root.player2._y -=90;
if (_root[“player2”].hitTest(_root[“targetfive”]))
_root.player2._x +=80,_y +=80;
if (_root[“player2”].hitTest(_root[“targetsix”]))
_root.player2._y +=80;
if (_root[“player2”].hitTest(_root[“targetseven”]))
_root.player2._x +=80, _y +=80;
if (_root[“player2”].hitTest(_root[“targeteight”]))
_root.player2._x -=130, _y +=80;
if (_root[“player2”].hitTest(_root[“final”]))
_root.final.gotoAndPlay(2);
}
I have no actions applied to any of the snakes and ladders squares ( movieclips) , apart from the final one (called final) which simply is stop();
I really hope someone can help.
Lesley