dynamic class leftShapes extends MovieClip { var leftShapeNumber:Number; var selectedPiece:Number; var tabSound:Sound; function leftShapes() { var leftShape = attachMovie("shape" + leftShapeNumber, 'leftShape', 250); leftShape._x = 40; leftShape._y = 40; leftShape._width = 60; leftShape._height = 60; colorLeftShape = new Color(leftShape); colorLeftShape.setRGB(0x333333); } function onRollOver() { if (tabbingON) { playSound("shapeLeft" + leftShapeNumber); } } function onPress() { if (tabbingON || !draggingON) { pickupPiece(this._name); } // if puzzle piece is in right spot, then place else if (eval(_root[this._name]._droptarget) == _root["rightShape" + selectedPiece]) { placePiece(this._name); // if puzzle piece is not in right spot, then return it } else { returnPiece(this._name); } } function onRollOut() { n1 = leftShapeNumber; takeOut(n1); } function pickedShape() { var pickedShape = attachMovie("shape" + leftShapeNumber, 'pickedShape', 1200); pickedShape._x = 40; pickedShape._y = 40; pickedShape._width = 60; pickedShape._height = 60; colorPickedShape = new Color(pickedShape); colorPickedShape.setRGB(0x333333); pickedShape._alpha = 50; } }