SOLVED: App works in FlashDevelop not in Flash Pro CS5.5

I have a box2d app working fine under the latest FlashDevelop 4.0.4 RTM

but when I move the code over to Flash Pro CS5.5 (onto a frame in the timeline) I get the error below.

Any suggestions on what could be the problem?

ArgumentError: Error #2004: One of the parameters is invalid.
at flash.display::Graphics/drawRoundRect()
at flash.display::Graphics/drawCircle()
at Box2D.Dynamics::b2DebugDraw/DrawSolidCircle()
at Box2D.Dynamics::b2World/http://www.box2d.org/ns/b2internal::DrawShape()
at Box2D.Dynamics::b2World/DrawDebugData()
at IntroMovie/update()
SOLVED.

Caused by unitialised vars, due to code being placed in wrong position.

When I had moved code from FlashDevelop I placed function calls above some variables that were defined after these calls, like this:

...............................
test();
testWheel();

var m_sprite:Sprite;
var m_world:b2World;
var m_timeStep:Number = 1.0 / 30.0;
var m_physScale:Number = 30;
...............................

So my functions used unitialised numbers containing NaNs which were used to create circle positions, which were themselves NaNs and so the draw code ultimately failed.

Original thread: https://box2d.org/forum/viewtopic.php?t=8891