Hi, Yes, The movieclip THE is in the Library. I click on it and it displays in the preview window. It has the Class name of THE and the base class of: flash.display.MovieClip This why I am flustered by this, it should work. Here is the complete code: There are actually five Movieclips, each one is a word: ========================================================== stop(); import flash.display.MovieClip; import flash.events.MouseEvent; import flash.filters.DropShadowFilter; import THE; import BOY; import KICKED; import HIS; import BALL; var _targetPiece:*; var _origX:Number; var _origY:Number; var _totalPieces:Number; var _currentPieces:Number; var the:THE; var boy:BOY; var kicked:KICKED; var his:HIS; var ball:BALL; function DragGame() { _totalPieces = 5; _currentPieces = 0; createPieces(); } function createPieces():void { the = new THE(); addChild(the); the._targetPiece = tTHE_mc; the.addEventListener(MouseEvent.MOUSE_UP, checkTarget); the.x = 103.50; the.y = 72.60; boy = new BOY(); addChild(boy); boy._targetPiece = tBOY_mc; boy.addEventListener(MouseEvent.MOUSE_UP, checkTarget); boy.x = 165.25; boy.y = 72.30; kicked = new KICKED(); addChild(kicked); kicked._targetPiece = tKICKED_mc; kicked.addEventListener(MouseEvent.MOUSE_UP, checkTarget); kicked.x = 247.05; kicked.y = 72.30; his = new HIS(); addChild(his); his._targetPiece = tHIS_mc; his.addEventListener(MouseEvent.MOUSE_UP, checkTarget); his.x = 323.85; his.y = 72.30; ball = new BALL(); addChild(ball); ball._targetPiece = tBALL_mc; ball.addEventListener(MouseEvent.MOUSE_UP, checkTarget); ball.x = 379.60; ball.y = 72.75; } function DragDrop() { _origX = this.x; _origY = this.y; this.addEventListener(MouseEvent.MOUSE_DOWN, dragMovie); this.addEventListener(MouseEvent.MOUSE_UP, dropMovie); this.buttonMode = true; } function dragMovie(event:MouseEvent):void { this.startDrag(); this.filters = [new DropShadowFilter()]; this.parent.addChild(this); } function dropMovie(event:MouseEvent):void { this.stopDrag(); this.filters = []; } function disable():void { this.buttonMode = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, dragMovie); this.removeEventListener(MouseEvent.MOUSE_UP, dropMovie); } function checkTarget(event:MouseEvent):void { if(event.currentTarget.hitTestObject(event.currentTarget._targetPiece)) { event.currentTarget.x = event.currentTarget._targetPiece.x; event.currentTarget.y = event.currentTarget._targetPiece.y; event.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, checkTarget); event.currentTarget.disable(); _currentPieces ++; if(_currentPieces >= _totalPieces) { gotoAndStop (5); } } else { event.currentTarget.x = event.currentTarget._origX; event.currentTarget.y = event.currentTarget._origY; //gotoAndStop (7); } }
... View more