stop();
// Second Level Quit button
// loads second.swf in again
quit_mc.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_2);
//go to next scene button
forwardTed.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextScene);
var dragArray:Array = [Sign30, Sign60, Sign70, Sign70_2 ];
var matchArray:Array = [Sign30Match, Sign60Match, SignMatch70 || SignMatch70_2 ];
var currentClip:MovieClip;
var startX:Number;
var startY:Number;
*
for(var i:int = 0; i < dragArray.length; i++) {
**dragArray[i].buttonMode = true;**
**dragArray[i].addEventListener(MouseEvent.MOUSE_DOWN, item_onMouseDown);
**matchArray[i].alpha = 0.0;
}
*
function item_onMouseDown(event:MouseEvent):void {
****currentClip = MovieClip(event.currentTarget);
****startX = currentClip.x;
****startY = currentClip.y;
****addChild(currentClip); //bring to the front
****currentClip.startDrag();
****stage.addEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
}
function stage_onMouseUp(event:MouseEvent):void {
****stage.removeEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
****currentClip.stopDrag();
****var index:int = dragArray.indexOf(currentClip);
****var matchClip:MovieClip = MovieClip(matchArray[index]);
****if(currentClip.hitTestObject(matchClip)) {
********//a match was made! position the clip on the matching clip:
********currentClip.x = matchClip.x;
********currentClip.y = matchClip.y;
********//make it not draggable anymore:
********currentClip.removeEventListener(MouseEvent .MOUSE_DOWN, item_onMouseDown);
* currentClip.buttonMode = false;
****} else {
********//match was not made, so send the clip back where it started:
currentClip.x = startX;
currentClip.y = startY;
****}
}