<mx:Script> <![CDATA[ flash.display.stage.addEventListener(MouseEvent.CLICK, clickTracker()); private var firstClick:Array = new Array; private var secondClick:Array = new Array; private var line:Shape = new Shape; private function clickTracker():void { if (firstClick.length < 2) { firstClick[1] = stage.mouseX; firstClick[2] = stage.mouseY; } else { secondClick[1] = stage.mouseX; secondClick[2] = stage.mouseY; startLineDraw(MouseEvent); } } private function startLineDraw(myMouseEvent:MouseEvent):void { line.graphics.beginFill(0x000000); line.graphics.moveTo(firstClick[1], firstClick[2]); line.graphics.lineTo(secondClick[1], secondClick[2]); } ]]> </mx:Script>
i basically want to grab the first and second click and draw a line from the first click to the second click. and im a total newb with this shit... anyone know what im doing wrong? this is the error im getting: 1067: Implicit coercion of a value of type Class to an unrelated type flash.events:MouseEvent. 1180: Call to a possibly undefined method clickTracker. 1202: Access of undefined property stage in package flash.display. thanks! tony ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:300984 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5