2 Replies Latest reply on Jul 23, 2006 3:22 PM by flashfloozie

    mouse click listener

    flashfloozie Level 1
      I cant seem to find how to get this to work. When my swf file enters and stops on a certain frame I need to listen for mouse clicks. After no clicks for 2-3 minutes I need to go to another frame. Can anyone help please?

      ff
        • 1. mouse click listener
          calaway
          Try putting this on the frame it waits on:
          • 2. Re: mouse click listener
            flashfloozie Level 1
            Thanks so much for the help. There is still a problem. I should have explained more I'm sure. anyway:

            The frame I'm wanting to wait at is full of flv playback components.
            here's the code on that frame so far: I need the mouse click to just reset the counter I think. The user will click on the buttons on frame 28 to play the videos. after they quit viewing videos and walk away (and after 2 minutes) I want to goto frame one and play the whole timeline again and then it will stop on frame 28 for 2 minutes again. The click cant make a goto happen.

            stop();

            myVideo.stopButton= franStop_btn;
            myVideo.playPauseButton = franPlayPauseButton;
            david.stopButton= davidStop_btn;
            david.playPauseButton = davidPlayPauseButton;
            bob.stopButton= bobStop_btn;
            bob.playPauseButton = bobPlayPauseButton;
            rebecca.stopButton= rebStop_btn;
            rebecca.playPauseButton = rebPlayPauseButton;

            erica.stopButton= ericaStop_btn;
            erica.playPauseButton = ericaPlayPauseButton;
            mike.stopButton= mikeStop_btn;
            mike.playPauseButton = mikePlayPauseButton;
            why.stopButton= whyStop_btn;
            why.playPauseButton = whyPlayPauseButton;
            josh.stopButton= joshStop_btn;
            josh.playPauseButton = joshPlayPauseButton;

            joe.stopButton= joeStop_btn;
            joe.playPauseButton = joePlayPauseButton;
            dave.stopButton= daveStop_btn;
            dave.playPauseButton = davePlayPauseButton;
            volmike.stopButton= volmikeStop_btn;
            volmike.playPauseButton = volmikePlayPauseButton;
            orgmike.stopButton= orgmikeStop_btn;
            orgmike.playPauseButton = orgmikePlayPauseButton;

            var counter:Number = 0;
            var mouseListener:Object = new Object();
            var timerInterval:Number = setInterval(playMovie, 1000);
            function playMovie() {
            if (counter == 120) {
            clearInterval(timerInterval);
            gotoAndPlay(1);
            } else {
            counter++;
            }
            }
            mouseListener.onMouseDown = function() {
            gotoAndPlay(28);
            };