Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / May 2005



Tip: Looking for answers? Try searching our database.

question of _xmouse

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zhaqiang - 31 May 2005 11:02 GMT
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."
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.