0 Replies Latest reply on Mar 28, 2012 12:20 AM by AI_learner

    Capturing Mouse Down Event on Mac.

    AI_learner Level 1

      Hi Guys,

      Actually I had add a listener for a MouseDown Event in flex installed on Mac.

      But it didn't worked as it like to be.

      The listener function does not call when we press the mouse and hold it.

      But it works fine on windows the listener function calls exactly when we press the mouse and hold it.


      Following is the sample code which i have tried on both mac and windows.

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" historyManagementEnabled="false" creationComplete="application1_creationCompleteHandler(event)">




          import mx.events.FlexEvent;


          protected function MouseMove(event:MouseEvent):void


            tb.text = event.localX.toString();



          protected function MouseDown(event:MouseEvent):void


            tb.text = "mousedown";



          protected function application1_creationCompleteHandler(event:FlexEvent):void


            vb.addEventListener(MouseEvent.MOUSE_MOVE, MouseMove); 

            vb.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);






      <mx:VBox id="vb" height="100%" width="100%" verticalAlign="middle" horizontalAlign="center">

          <mx:TextInput id="tb"/>





      Please can anyone explain me why the behaviour is changed on both the platforms.