How do I enable a disabled joint?

I have a situation where I am checking the "disabled" component parameter for a joint that I want to re-enable later.

Basically I want to activate the joint when one object hits another so they are locked together. Just setting myJoint.disabled to false when the objects hit doesn't work. Is there a function for this? Another option would be to set target1Name when the objects hit, but leaving myJoint.target1Name empty in the component then assiging later doesn't work either.
Try callling "create()" on the joint. All "disabled" does is prevent this from being called when the joint is added to the stage.
Thanks! Although it did lock the joint to the object (I can see it rolling along with the object), the connection between target1Name and target2Name doesn't happen and I get the following error:

Assertion failed: (IsLocked() == false), function CreateJoint, file ../Box2D/Dynamics/b2World.cpp, line 210.

[object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics.Joints::b2Joint()
at Box2DAS.Dynamics.Joints::b2DistanceJoint()
at wck::Joint/createDistanceJoint()
at wck::Joint/createJoint()
at wck::Joint/create()
at Level4/handleContact()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()
at Box2DAS.Dynamics::b2ContactListener/ContactDispatch()
at Box2DAS.Dynamics::b2ContactListener/BeginContact()
at Box2DAS.Dynamics::b2World/BeginContact()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at global/AS3_CallTS()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/<anonymous>()
at cmodule.Box2D::FSM__ZN13WorldListener12BeginContactEP9b2Contact/work()
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2World/HandleStep()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()
at Box2DAS.Dynamics::b2World/Step()
at wck::World/step()
You're doing that in a contact callback. Box2D doesn't like doing things while the time step is running. Just call it outside the time step:

world.doOutsideTimeStep(myJoint.create);
Thanks mayobutter! You are saving me a lot of time. I really appreciate your help. 🙂

I didn't know about the TimeStep stuff and your insight led me to another forum post about doOutsideTimeStep that helped me as well.

world.doOutsideTimeStep(function() { /* do stuff like active = false; */ });

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