Groups | Blog | Home
all groups > flash actionscript > april 2006 >

flash actionscript : How do I check from AS if Mouse is shown or hidden?


David Stiller
4/28/2006 3:41:21 PM
aa,

[quoted text, click to view]

Hm. That's honestly an interesting question. As far as I know, you
can't. But if you need it to be one or the other, you can certainly count
on it that the Mouse.show() and Mouse.hide() methods work. ;) In any case,
you can write a class or store a global variable to keep track for you.


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."

David Stiller
4/28/2006 3:53:45 PM
[quoted text, click to view]

Ah, good call, shyaway! AS Language Reference to the rescue.

[quoted text, click to view]

Eh, that's okay, I think. You won't even see it happening. Just pick
one, note the return value, then switch it back. That's better than my
global variable suggestion.


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."

shyaway
4/28/2006 7:44:45 PM
show (Mouse.show method)
public static show() : Number

Displays the mouse pointer in a SWF file. The pointer is visible by default.

Availability: ActionScript 1.0; Flash Player 5

Returns
Number - An integer; either 0 or 1. If the mouse pointer was hidden before the
call to Mouse.show(), then the return value is 0. If the mouse pointer was
visible before the call to Mouse.show(), then the return value is 1.
------------------------------------------------
so, yeah. there's no property that you can use to detect it. you have to
change its state to know that :|
aa
4/28/2006 11:26:04 PM
How do I check from AS if Mouse is shown or hidden?

aa
4/29/2006 12:25:35 AM
Thanks

AddThis Social Bookmark Button