1 Reply Latest reply on Jun 20, 2009 6:29 AM by Ned Murphy

    Mouse Event Error (AS3)



              I am new to AS3, I wish to add the following functionality.

                  (1)A click on stage


                  (2)"load a movie clip from library to that mouse pointed location"


      Should I use an "on enter frame" event equivalent in AS3 or is there any other way...

      i.e. How do I code to keep listening to an event continuously on the Stage?



      Thank you.

        • 1. Re: Mouse Event Error (AS3)
          Ned Murphy Adobe Community Professional & MVP

          Try the following and see if it is useful for your purpose:


          stage.addEventListener(MouseEvent.CLICK, tryIt);


          function tryIt(evt:MouseEvent):void {

               var thing:ClassID = new ClassID(): // where ClassID is the class ID you assign to the library object

               thing.x = mouseX;

               thing.y = mouseY;