9 Replies Latest reply on Mar 21, 2007 2:33 PM by Meliora_Software

    Block Director controls in authoring environment

    Level 7
      Is there a way to prevent all Director controls from responding while the
      movie is playing in the authoring environment? I'm trying to make a game,
      which uses the arrow keys and Ctrl/Alt/Shift as controls, and these can have
      disasterous effects when used together. (Ctrl-Up or Ctrl-Down will cause
      sprites to move into a different channel, Ctrl-Left or Ctrl-Right will make
      the playhead move to the previous or next marker, Alt-anything activates the
      menus which messes up everything.) I'd also like a way to disable the '0'
      key next to the arrows, as it causes the movie to stop. Ideally, I'd like
      to disable ALL the keyboard shortcuts, and be forced to use the mouse on the
      stop button when I want to finish testing. It's just really annoying to
      have to make a projector every time I change anything in order to test it
      properly.


        • 1. Re: Block Director controls in authoring environment
          Level 7
          There's no way to disable the authoring key interception.

          However, you don't have to keep making a projector - that's the beauty
          of a stub projector. You make it once and as long as you don't have the
          file open in the authoring environment, you run it and it navigates to
          your unprotected working file.
          • 2. Re: Block Director controls in authoring environment
            Meliora_Software
            > Is there a way to prevent all Director controls from responding while the movie is playing in the authoring environment?

            yes, KeyboardControl Xtra allows this, run keyboard filtering in the reverse mode to get the keyboard disabled:

            on startMovie
            HotKeyList = []
            KeyboardControlInit([#Mode:"Standard"])
            KeyboardControlSetHotKey(HotKeyList,"HotKeyHandler")
            KeyboardControlSetStopSeq("a+b+c","StopSeqHandler")
            KeyboardControlStart("Reverse")
            end

            The demo version of the Xtra will do the job.
            • 3. Re: Block Director controls in authoring environment
              johnAq Level 1
              I think if you use installmenu to create a new (empty) menu, you can override Director's controls to achieve this.

              hth

              johnAq
              • 4. Re: Block Director controls in authoring environment
                Chunick Level 3
                I really like MeloriaSoft's solution. Very slick and I know I'll be using it now in my development. :-)
                • 5. Re: Block Director controls in authoring environment
                  Meliora_Software Level 1
                  thanks for the good words :-)
                  • 6. Re: Block Director controls in authoring environment
                    Level 7
                    Actually, I am using installMenu already, but I mean using it to make menus.
                    That's actually part of the problem. There are keyboard shortcuts that use
                    the Ctrl-key to access menu commands (Ctrl-S = save game, etc.), and
                    sometimes my fingers won't be quick enough and I'll still have Ctrl down
                    when I go back and use the arrows, and chaos ensues. (And the Alt-key of
                    course goes up to the menus that exist, not as bad as the Ctrl-key problems,
                    but can be annoying. It's likely I'll be not using the Alt-key in the final
                    product for this reason.)

                    The KeyboardControl Xtra looks like a pretty good option, I may check that
                    out, just have to remember to disable it when making projectors. One
                    question, regarding another keyboard-related problem I was having.
                    Originally, my controls were basically the arrows to move and the spacebar
                    to jump. But I quickly found that pressing 2 arrows and the spacebar at the
                    same time would overload the keyboard buffer and not register properly.
                    (One thing I really miss about the old AT keyboards, which never seemed to
                    have this limitation. You could hold any combination of keys all at once
                    and they'd all register. PS/2 was NOT an improvement in that respect.)
                    Does this Xtra do anything to alleviate this problem?


                    • 7. Block Director controls in authoring environment
                      Meliora_Software Level 1
                      Darrel,

                      were you trying the old AT keyboards where you had no problems and PS/2 keyboards where the problem appeared with same Director version? Meaning the keyboard may not be the issue but the Director version.
                      • 8. Re: Block Director controls in authoring environment
                        Level 7
                        > were you trying the old AT keyboards were you had no problems and PS/2
                        > keyboards were the problem appeared with same Director version? Meaning
                        the
                        > keyboard may not be the issue but the Director version.

                        No, this is I'm pretty sure a hardware limitation introduced by PS/2
                        keyboards. I was reading up about it, and apparently, there was a problem
                        with old AT keyboards where if you pressed certain combinations of 4 or more
                        keys, it would register as a different keypress altogether (based on the
                        simple circuitry shortcuts made by the manufacturer). When PS/2 keyboards
                        came out, they eliminated this problem by having the keyboard simply not
                        send any signal at all if more than 3 keys were pressed at once. (Instead
                        of a more ideal solution which would mean more complex circuitry)
                        Unfortunately, it resulted in a lot of programs which depended on larger
                        numbers of key-presses to simply not work. (And it wasn't with Director -
                        the programs I created which used more keys were written in C, back in
                        pre-Windows days. Haven't had a computer with an AT plug on it for a long
                        time...) I recall having to create special handlers which would register
                        all key-up and key-down events and store the current key-states in an array
                        which you'd look up. Was just wondering if your Xtra did this, or whether
                        the hardware limitations of the keyboard itself would prevent any software
                        solution from working.


                        • 9. Re: Block Director controls in authoring environment
                          Meliora_Software Level 1
                          Darrel,

                          2 arrows and the spacebar would work on most keyboards quite smoothly. We've tried many 3 keys combinations on AT keyboards, PS/2 keyboards and USB keyboards without having any problems.
                          Very true on four keys combinations. Four keys pressed at once screw the keyboard up and it's a hardware limitation indeed. Keyboard drivers never receive appropriate notifications for all 4 keys pressed at once, hardware fails to report the keypress properly. A Mac USB keyboard connected to a PC handles 4 keys pressed a bit better but still far from perfect.
                          So you were correct when said that hardware limitations of the keyboard would prevent any software solution from working.