Newb Box2D question user graphic update

Hey, I've gone through a couple of tutorials and seen some nice stuff and I'd like to recreate it.

Here, I've taken the video tutorial, and applied the code from it (updating the CreateStaticBody to just CreateBody as version 2.0.1 doesn't have Static or Dynamic functions).

So, I've gotten my floating static rectangle.
Now, I've worked out (because we have no CreateDynamicBody and only CreateBody) that if you change the density and restitution (as if elasticity isn't a hard enough word) it can become dynamic.

So, I've made a function to make three simple dynamic circles. And they collide with everything in my world including my floating rectangle. GREAT.

Now, I've seen in another older tutorial you can use the userData to equal to sprites in your library class.
So I've made a library object, set my userData to my library object and addChild() my userdata. But now I need to update the co-ordinates of my userData along with my Step function.
However, the older tutorial uses a different version of Box2D and throws compiler errors that say the properties no longer exist (most likely renamed).

Here is the code to update all the userDataSprites from the tutorial:
Code:
// Go through body list and update sprite positions/rotations
   for (var bb:b2Body = myWorld.m_bodyList; bb; bb = bb.m_next) {
      if (bb.m_userData is Sprite) {
         bb.m_userData.x = bb.m_position.x;
         bb.m_userData.y = bb.m_position.y;
         bb.m_userData.rotation = bb.m_rotation * (180/Math.PI);
      }
   }// This is an extremely clever way to do this, and I suggest you copy it exactly in your own projects.


Now, this code throws me off. I'm used to using the for statement in your usual number state such as:
for (var i:int=0; i<10; i++)
How does a b2Body object in the second parameter equal true or false?
Any help understanding would be much appreciated.

And also the errors being thrown are bb.m_rotation, bb.m_position.x and bb.m_position.y. Is there another way to get these values to make it work?

Thanks for reading such a lengthy post.
Code:
if (referenceToNonPrimitiveObject)
is shorthand for:
Code:
if (referenceToNonPrimitiveObject != null)
The "for" loop is iterating over elements of a linked list. The last element points to null.
Thanks very much 😀
That little bit of explanation twigged the rest of the code.

I read through the classes and now understand how m_bodyList, and m_next (and m_prev) works. There is a clear explanation in the classes too:
/// Get the world body list. With the returned body, use b2Body::GetNext to get
/// the next body in the world list. A NULL body indicates the end of the list.

Another newb question. I've been playing around with BoxCAD to do some tests with. And there seems to be a line tool in the program. Is this just a thin rotated rectangle or is there a line shape definition in Box2d?

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