Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: HELP! coordinate accuracy |
From: | T.R. Henigson |
Date: | Mon, 8 May 2000 15:09:00 +0100 |
I sent this a second ago:
Does Flash have a problem with accuracy of coordinates? I wrote some
Actionscript to animate an icon over a bar to rest and it rests at
different coordinates depending on whether it's coming from the left
or the right. It's animating by comparing the difference in its position
with the position of the resting point and then slowly adjusting its
position. From the right, it rests right on the mark. From the left,
it's about a tenth off. Have you heard of this? What's the problem?
MORE DETAILS: I am dividing the distance between the icon and it's point
of rest by 3 to introduce some latency into the animation. This seems to
be what creates the problem. "logoX" is the icon, "thisX" is the resting
point
FROM THE RIGHT, WORKS NO PROBLEM - "difX" goes to 0 and "logoX" equals
"thisX"
logoX: 431.9 difX: -0.800000000000011 thisX:431.1
logoX: 431.6 difX: -0.5 thisX:431.1
logoX: 431.4 difX: -0.300000000000011 thisX:431.1
logoX: 431.3 difX: -0.199999999999989 thisX:431.1
logoX: 431.2 difX: -0.100000000000023 thisX:431.1
logoX: 431.15 difX: -0.0500000000000682 thisX:431.1
logoX: 431.1 difX: 0 thisX:431.1
logoX: 431.1 difX: 0 thisX:431.1
logoX: 431.1 difX: 0 thisX:431.1
logoX: 431.1 difX: 0 thisX:431.1
FROM THE LEFT, TROUBLE - "difX" never makes it to 0 and "logoX" never quite
equals "thisX"
logoX: 430.3 difX: 0.800000000000011 thisX:431.1
logoX: 430.55 difX: 0.549999999999955 thisX:431.1
logoX: 430.7 difX: 0.399999999999977 thisX:431.1
logoX: 430.8 difX: 0.300000000000011 thisX:431.1
logoX: 430.9 difX: 0.199999999999989 thisX:431.1
logoX: 430.95 difX: 0.14999999999992 thisX:431.1
logoX: 431 difX: 0.100000000000023 thisX:431.1
logoX: 431 difX: 0.100000000000023 thisX:431.1
logoX: 431 difX: 0.100000000000023 thisX:431.1
logoX: 431 difX: 0.100000000000023 thisX:431.1
logoX: 431 difX: 0.100000000000023 thisX:431.1
That's all. I really hope you can help,
Ted
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml
Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]