3 Replies Latest reply on Oct 17, 2007 5:29 AM by Newsgroup_User

    trigger /simulate mouseclick

    Level 7
      Hi,

      I know the setmouse xtra where you can set the position of the mouse
      cursor but is there a way to simulate a mouseclick? So it would effect
      sprites and flashmovies inside director?

      TIA
        • 1. Re: trigger /simulate mouseclick
          Level 7
          Hi Marco,

          using the sendsprite() command you can execute a behavior's mouse
          EventHandler.

          I'm not sure about scripts in a Flashmovie though. Well...

          if the Flashmovie has a function defined and that function is made the
          onPress eventHandeler like so:

          my_btn.onPress = onButtonPress;
          function onButtonPress(){
          trace("yada");
          }

          You could call that function from Lingo. Not behind Director, but it
          should be in the helpfiles how to call a flash function.

          HTH
          Manno

          PS: Nice, almost oldschool name. MacroMind: Macromedia's predecessor :)


          Marco Mind wrote:
          > Hi,
          >
          > I know the setmouse xtra where you can set the position of the mouse
          > cursor but is there a way to simulate a mouseclick? So it would effect
          > sprites and flashmovies inside director?
          >
          > TIA


          --
          ----------
          Manno Bult
          http://www.aloft.nl
          • 2. Re: trigger /simulate mouseclick
            Level 7
            I just thought it might be easier to use a real simulated mouseclick. So
            I would not have to translate positions from director into flash. As I
            also have a rotated flash inside director. :-|
            • 3. Re: trigger /simulate mouseclick
              robdillon Most Valuable Participant
              You can use the call command to invoke a function in a behavior or movie script. You can use sendSprite() or sendAllSprites() to invoke a function in a single sprite's behavior or to all sprites in a particular frame.