3 Replies Latest reply on Dec 22, 2006 12:38 PM by zadig007

    Cursor problem

    zadig007 Level 1
      Hello,
      I am using Dir MX (Mac) and transferring projects from Dir 8.5
      - When in a "repeat...while" loop, the system takes control over the system and turns it into the horrible spinning ball: it was not so in 8.5. Is it possible to avoid that?
      - In my project, the user must click (from 2 to about 20 times) on precise locations of the screen: so I need the cross cursor.
      I do not see how this can be done except with a loop waiting for the desired number of clicks or an exit command...
      Any help much appreciated!
      Thanks in advance.
        • 1. Re: Cursor problem
          Level 7
          You may have to re-work how you do your repeats if possible. You have to use
          on enterframe and a counter attached to a sprite. There are examples around
          if you google.

          "zadig007" <webforumsuser@macromedia.com> wrote in message
          news:emejkl$kc0$1@forums.macromedia.com...
          > Hello,
          > I am using Dir MX (Mac) and transferring projects from Dir 8.5
          > - When in a "repeat...while" loop, the system takes control over the
          > system
          > and turns it into the horrible spinning ball: it was not so in 8.5. Is it
          > possible to avoid that?
          > - In my project, the user must click (from 2 to about 20 times) on precise
          > locations of the screen: so I need the cross cursor.
          > I do not see how this can be done except with a loop waiting for the
          > desired
          > number of clicks or an exit command...
          > Any help much appreciated!
          > Thanks in advance.
          >


          • 2. Re: Cursor problem
            James Newton, ACP Level 3
            Mac OSX is much less forgiving than Mac OS9 and earlier when it comes to tight repeat loops.

            I faced a similar issue with the built-in Canvas behavior. The Director 8.0 version of this behavior used a tight repeat loop to track the movements of the mouse. I had to rewrite this for MacOSX. You can find the revised version here. The new version increases the frame rate of the movie while the user is dragging the mouse, so that it is twice as fast as the refresh rate of the mouseLoc. This means that whenever the mouseLoc changes, the script will detect the new position. The behavior no longer uses a tight repeat loop, and is just as accurate.
            • 3. Re: Cursor problem
              zadig007 Level 1
              Many thanks!
              I'll study your code - hope I can adapt it.