Hiding the Mouse on Start of Movie
Hello All,
I have a flash program that runs on a PC that is connected to a TV. In case it helps at all, the PC is running OpenSuSE 12.1/KDE 4.
The PC is acting as a kiosk like device where no user is actually sitting at the PC doing stuff. If we ever need to do anything with it
we do it remotley using something like VNC or Remote Desktop or SSH, etc....
So what happens is when the PC is powered on it boots up and automatically logs in the default user. Then I set Firefox to start
automatically on boot and I set it's Homepage to the URL where the swf file lives (*which is located on another Server). Also, Firefox
automatically goes into Fullscreen mode mode using the Firefox Plugin "Full Fulscreen".
The issue is that, after the PC boots up and Firefox starts and the Flash movie begins playing, I can see the Mouse pointer sitting in the
middle of the screen which does NOT go away. So I found some code online that will hide the mouse after 'n' seconds. But the problem
is that when the Flash movie starts the mouse will NOT disappear after 'n' seconds. It is possible to get it to disappear, but in order to do
so I would have to tap the mouse so that it moves even the slightest, then after it stops moving it then disappears after 'n' seconds...
Since there really isn't any person who starts the movie manually, or since no one sitting in front of it with a mouse in their hand this won't
do what I wanted it to do....
Here is what I have so far in order to hide the mouse:
// Added this line after testing the code below. But still didn't hide the pointer when the movie was started
//Mouse.hide(); // Hide the mouse automatically when started (*no time limit for this one)
var timeLimit:int = 3; // Integer to hold what the Time Limit will be
// Add the EventListener for when the Mouse is moved:
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
// Create a Timer Object and multiply timeLimit by 1000 to get seconds:
var timer:Timer = new Timer(timeLimit * 1000);
// Add the EventListener for the Timer:
timer.addEventListener(TimerEvent.TIMER, onInactiveMouse);
// Function "onMove()":
// *This will show the Mouse, stop the timer, then restart the timer...
function onMove(event:MouseEvent):void {
trace("In onMove() --- Showing the Mouse Now...");
Mouse.show();
timer.stop();
timer.start();
}
// Function "onInactiveMouse()":
// *This will hide the Mouse when the TimeLimit has been reached...
function onInactiveMouse(event:TimerEvent):void {
trace("In onInactiveMouse() --- Hiding the Mouse Now...");
Mouse.hide();
}
So I guess my question is, is there a way to hide the mouse without a Human having to intervene and move the mouse pointer?
Also, I don't know if it was just some weird thing that happens, but say the movie is up and I move the mouse so it then disappears after n seconds.
Then the Frame changes and under where the mouse is hiding a TextField appears (*NOT an input TextField, just a Dynamic Text) suddenly the mouse
reappears, but it appears as the text selection pointer (*i.e. the one that looks like an Upper-Case "i"). And it won't disappear unless I move the pointer
again, Strange..! I guess I could fix this by changing all my TextFields to be NOT selectable, but I was just curious if anyone else had experienced this?
Anyway, any thoughts/suggestions would be greatly appreciated!
Thanks in Advance,
Matt
