Workaround CS5 component number problem

July 12th, 2010 by max » (1) » AS3

I came across this problem last week and it drove me nuts!

I had a draggable component with a numerical value for its drop-coordinates. When I entered the first coordinate 0|0, it worked perfectly. But changing this to 10|20 didn’t work anymore. I debugged, and found that the dropX and dropY were »NaN«.

I couldn’t find anything on the net so I tried more. I reopened it in Flash CS4 and found that the value weren’t 10|20, but 10,00|20,00. So I started working around and got to this »solution«:

Instead of typing 10 i tried 0,10 and that works. But only for values up to 99!

I’m not shure whether this is a Number/Integer/Float-problem that I messed up, or if the new Mac OS X 10.6 Flash CS5 IDE has a bug. Anyone firm with datatypes that knows the answer?