A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: trouble with mouseMove

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    156

    trouble with mouseMove

    I am building a kind of interactive kiosk presentation that will just be sitting on a computer at a conference. When it initially starts I put an onMouseMove so that it sits at frame one until someone moves the mouse, but as soon as it starts it detects that as mouse movement. I'm not sure if I'm putting the code in the wrong place. I've tried it on the mc that is in frame one, and I've also tried puting it on frame one.

    code:

    _root.onMouseMove = function(){
    _root.gotoAndPlay("logoFadeOut");
    }

    Thanks

  2. #2
    Senior Member studioqtopia's Avatar
    Join Date
    Nov 2003
    Location
    California
    Posts
    582
    try using a listener. place this on frame 1 of the main timeline.

    stop();
    myListener = new Object();
    myListener.onMouseMove = function() {
    gotoAndPlay("logoFadeOut");
    };
    Mouse.addListener(myListener);

    note: when the movie is first loaded it will detect the mouse for the first time and trigger a mousemove. after that first initialization it will work fine.

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Posts
    156
    Thank you for your reply. I tried using the listener and had the same problem, likely because, as you say, it detects the mouse right off.

    I solved the problem though. I just put a static image in the first five frames and let the play head go to frame five and stop. At that point it wasn't detecting movement from the mouse anymore till it acutally moved.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center