-
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
-
Senior Member
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.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|