4 Replies Latest reply on Feb 26, 2008 10:21 AM by BSpero

    Little Confusion About Mouse Events

    BrianTaller
      Hello. So i have been hired to build a shock-wave based virtual-tour (360 degree) viewer. Everyone says this should be in flash, but that's besides the point. My boss insists on shockwave. Anyway, I am almost done with the viewer, however I running into one little problem: After the image is loaded and a person can manipulate it, there are still a few other miscellaneous things I have to load (so I need the movie to keep playing so I can load the rest of the items that appear later in the score). The problem is that when a user holds down the mouse button to play with the 360 image, the score stops. It resumes again when the person release the mouse button, but the big issue is that it stops when the mouse button is held down. Thus my boss is complaining that those misc items that appear later in the score are taking too long to load. I know this is happening only because of the mousebutton thing (i.e. the score stops playing until the mouse button is released), however I cannot explain this to him. I simply need to score to continue playing no matter what so I can load everything. What am I missing? How can I make the score ignore those mouseevents so that it isn't interrupted and it can get to those other items and load them? Thanks so much for your assistance.

      Brian
        • 1. Re: Little Confusion About Mouse Events
          Level 7
          > The problem is that when a user holds
          > down the mouse button to play with the 360 image, the score stops.

          How is this "360 degree image" implemented? Is it QTVR? Can you show
          some code that runs while the mouse is interacting with this image?
          • 2. Re: Little Confusion About Mouse Events
            Level 7
            It sounds like there is a repeat loop somewhere in your code that
            repeats while the mouse is down. IF so, that part of your code needs to
            be rewritten, as it prevents anything else from executing while the
            mouse is down.

            A better solution is to check the mouseDown condition in an exit frame
            handler and respond to it there. Like Sean suggested, if you will post a
            bit of your code it would help.
            • 3. Re: Little Confusion About Mouse Events
              BrianTaller Level 1
              Thanks for the responses. I wish I could post some code but my employer has held me to some strict confidentiality clauses. Not sure why, that's the reason why I can't share code. In general, does Director "freeze up" while the mouse button is down until it is released? That wouldn't make sense sense, onmousedown and onmouseup are completely different conditions. Again, I am new so I am sure what you mean by check the onmousedown condition in an exit frame handler, but I will google it. Such an annoying little bug. I will look into the exit frame and post my findings. Any other things I should be looking for?

              By the way, thanks so much for helping to point me in the right direction.
              • 4. Re: Little Confusion About Mouse Events
                BSpero Level 1
                Brian,
                Director does not freeze up while a mouse button is down normally. Dave is right, as there is probably a piece of code somewhere that continues to execute as long as the mouse is down. Does the freeze happen only when you have the mouse down on the QTVR, or anywhere in the movie? If it's only while dragging the QTVR, then your problem code may be attached to that. If it's anywhere, then the code may live in a movie script somewhere.

                - B