Expression not evaluating correctly

Hi,
I have three movie clips on my stage all are at y=388.9. In the actionscipt for the movie clips I have this statement…

if (this._y==388.9){
trace(‘something!’);
}
else{
trace(‘nothing’);
trace(this._y);
}
Output:
nothing
388.9

everytime this is run the expression results in false and ‘nothing’ and the y coordinate (388.9) print out.

Does anyone know why this expression evaluates to false even though this._y is 388.9?

I must be missing something. All the other movie clips at different y values evaluate correctly.

Thanks.

its just one of those crazy rounding deals.
http://www.macromedia.com/support/flash/ts/documents/roundoff_error.htm

this one is odd because its not evident in a trace, but you can fix it by forcing a round of the _y

if (Math.round(this._y*10)/10 == 388.9){

^using round with the *10 and /10 rounds the value to the nearest 10th and then you’ll have yourself a sure winner.

Thank you. That fixed it.