Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hide cursor when mouse stopped

8 views
Skip to first unread message

timdenty

unread,
Oct 11, 2002, 6:53:24 AM10/11/02
to
Hi all - does anyone know a way to hide the cursor only when the mouse is not moving. When the mouse is moved - then the cursor would re-appear and so on. Hmmm - Tricky one??

Ta in advance

Denty


Referring URLs


Andrew Morton

unread,
Oct 11, 2002, 7:21:57 AM10/11/02
to
As a frame script:-

property prevMouseLoc, myTimer
on enterFrame
if the mouseLoc<>prevMouseLoc then
cursor -1
myTimer=the milliseconds
prevMouseLoc=the mouseLoc
else
if the milliseconds-myTimer>200 then
cursor 200
end if
end if
end enterFrame

on beginSprite
prevMouseLoc=the mouseLoc
myTimer=the milliseconds
end beginSprite

on exitFrame
go the frame
end

I put the timing in to keep the appearance neater.

HTH

Andrew Morton

Darrel Hoffman

unread,
Oct 11, 2002, 9:16:05 AM10/11/02
to

"memd" <webfor...@macromedia.com> wrote in message
news:ao6dnr$16h$1...@forums.macromedia.com...
> look up the on idle, cursor and timer commeands in director help.
>
> something like this:
>
> if mytimeidle > this then
> cursor -200
> else
> cursor 0
> end if

Easier:

if the lastRoll > 60 then cursor 200
else cursor -1

This will make the cursor disappear after 1 second of not moving. (60
ticks)

(Note, you must use 200, not -200 to make the cursor disappear. Both 0
and -1 seem to work for getting the arrow back, but I believe there are some
instances where -1 will work more reliably than 0.)


timdenty

unread,
Oct 11, 2002, 11:06:06 AM10/11/02
to
Thanks 4 replies, the lartRoll command worked well as long as it is set as a movie script rather than a behaviour - I guess director has to keep re-checking the lastRoll condition.

Denty


Referring URLs


0 new messages