Yes, if I do remember correctly you can use box2d's userData var.
object.b2body.SetUserData("data")
then
myVar = object.b2body.GetUserData()
Also you could just use flash's naming var if you're not already using it (if you're using var name like you should.)
object.name = "data"
I tried the
object.name = "data"
But when I do the IF I get a error in Flash saying that the parameter field doesn't exist.
DON'T set the userdata of the b2Body! This needs to point to the BodyShape for things like contact events to work correctly.
The best way to add properties is to extend BodyShape with your own class and add public variables.
If you define a "ShapeBase" class that extends BodyShape at the root of your project, properties added to this class will be added to all shape.* instances.
Ok, I'm still learning with this thing ha ha, where do I do that?
Ok thanks, thought you meant I had to edit the code for the Shape object and add a new class in it's original file. No I was expecting to code just can't find any real documentation on this system, documentation that actually follows an API system, that shows each function for each object in it's proper order. If I could find documentation for it that showed objects and their resulting functions or methods I could follow, but I can't find that.