hi :
I had a question about the proporite _xmouse(also for _ymouse)
the proporite of the scene is 800*600 in pixels
but the return valuer of _xmouse is not a integer valeur.(EX 139.58)
so i dont know why he can return a suck number with pixels.
if it's realy in pixels,it must return a integer number i think.and that's i
need.
adireddy - 31 May 2005 11:49 GMT
yes, the value of _xmouse or _ymouse will not always be an integer value as it
returns the exact value of the mouse co-ordinates.
If you want the integer value you can round it off using Math.round(_xmouse);
zhaqiang - 31 May 2005 17:23 GMT
for adireddy
thanks for u help.
David Stiller - 31 May 2005 14:05 GMT
zhaqiang,
> I had a question about the proporite _xmouse(also for _ymouse)
> the proporite of the scene is 800*600 in pixels but the return valuer
> of _xmouse is not a integer valeur.(EX 139.58)
Flash allows subpixel rendering and goes as far as twips (one twentieth
of a pixel). So, in fact, you can place objects on the screen at floats.
If you prefer integers, consider using the Math.round() method.
David
stiller (at) quip (dot) net
"Luck is the residue of good design."