3 Replies Latest reply on Jan 19, 2007 3:45 AM by Newsgroup_User

    check input mouse in order

    Level 7
      Hello:
      I need to control the mouseclick in a specific sequence :
      four buttons in order 1,2,3 and 4.

      If that happens then do something.
      For example if user click on buttons 2,4,1,3 or 3,1,2,4 etc do nothing but
      if push 1,2,3,4 then works.

      Can you help me, please?
      thank you


        • 1. Re: check input mouse in order
          Level 7
          Excuse me.
          I think that the principal problem is to put this code in a exitframe.


          "Anne" <anmalo42@lycos.es> escribió en el mensaje
          news:eoq5b3$jfu$1@forums.macromedia.com...
          > Hello:
          > I need to control the mouseclick in a specific sequence :
          > four buttons in order 1,2,3 and 4.
          >
          > If that happens then do something.
          > For example if user click on buttons 2,4,1,3 or 3,1,2,4 etc do nothing
          > but if push 1,2,3,4 then works.
          >
          > Can you help me, please?
          > thank you
          >
          >


          • 2. Re: check input mouse in order
            Level 7
            "this" code? What code?


            --
            Craig Wollman
            Lingo Specialist
            Word of Mouth Productions
            212-928-9581

            www.wordofmouthpros.com
            "Anne" <anmalo42@lycos.es> wrote in message
            news:eoq669$kgd$1@forums.macromedia.com...
            > Excuse me.
            > I think that the principal problem is to put this code in a exitframe.
            >
            >
            > "Anne" <anmalo42@lycos.es> escribió en el mensaje
            > news:eoq5b3$jfu$1@forums.macromedia.com...
            >> Hello:
            >> I need to control the mouseclick in a specific sequence :
            >> four buttons in order 1,2,3 and 4.
            >>
            >> If that happens then do something.
            >> For example if user click on buttons 2,4,1,3 or 3,1,2,4 etc do nothing
            >> but if push 1,2,3,4 then works.
            >>
            >> Can you help me, please?
            >> thank you
            >>
            >>
            >
            >


            • 3. Re: check input mouse in order
              Level 7
              Put this in a movie script


              global gSequenceList, gClickedList

              on startMovie
              gSequenceList = [3, 2, 4, 1]
              gClickedList = []
              end


              Create 1 behavior with the code below and attach it to all four buttons,
              making sure each sprite is in a channel that is also represented in the list
              you created above. Using the above list you should have sprites in channels
              4, 5, 3, and 6. Otherwise it won't work. There is a way to have the 4
              sprites themselves create the list but you'd be limited to an ascending
              order of sprites only.

              global gSequenceList, gClickedList

              property pS, spriteNum

              on beginSprite me
              pS = sprite (spriteNum)
              end

              on mouseUp me
              if gClickedList.count < 4 then
              gClickedList.add (spriteNum)
              end if
              if gClickedList.count = 4 then
              if gClickedList = gSequenceList then
              -- DO WHAT YOU WANT HERE WHEN SEQUENCE IS CORRECT
              end if
              end if
              end


              --
              Craig Wollman
              Lingo Specialist
              Word of Mouth Productions
              212-928-9581

              www.wordofmouthpros.com
              "Anne" <anmalo42@lycos.es> wrote in message
              news:eoq5b3$jfu$1@forums.macromedia.com...
              > Hello:
              > I need to control the mouseclick in a specific sequence :
              > four buttons in order 1,2,3 and 4.
              >
              > If that happens then do something.
              > For example if user click on buttons 2,4,1,3 or 3,1,2,4 etc do nothing
              > but if push 1,2,3,4 then works.
              >
              > Can you help me, please?
              > thank you
              >
              >