Hello Guys,
I'm new with wck and I'm desperately need your help with this topic.

So based on the image above. I have a movieclip called
projectile_mc that I want to collide with the
bar_mc with a joint attached to it. Then once they collided I would like to remove/destroy
bar_mc. But I'm encountering an error on my output panel.
Code:
TypeError: Error #1006: value is not a function.
at cmodule.Box2D::FSM__ZN7b2World12DestroyJointEP7b2Joint/work()
at <anonymous>()
at <anonymous>()
at Box2DAS.Dynamics.Joints::b2Joint/destroy()
at <anonymous>()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at wck::World/step()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at <anonymous>()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at wck::World/step()
This happens everytime I have a joint attached to the bar_mc. But if there's no joint attached to it. It works perfectly.
This is my code inside bar_mc
Code:
import Box2DAS.*;
import Box2DAS.Collision.*;
import Box2DAS.Collision.Shapes.*;
import Box2DAS.Common.*;
import Box2DAS.Dynamics.*;
import Box2DAS.Dynamics.Contacts.*;
import Box2DAS.Dynamics.Joints.*;
import cmodule.Box2D.*;
import wck.*;
import shapes.*;
import misc.*;
import extras.*;
import flash.utils.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
var contacts:ContactList;
this.reportBeginContact=true;
this.reportEndContact=true;
contacts = new ContactList();
contacts.listenTo(this);
listenWhileVisible(this, ContactEvent.END_CONTACT, handleContact1);
function handleContact1(e:ContactEvent):void {
var q:mc_projectile=e.other.m_userData as mc_projectile;
if (q) {
this.remove();
}
}
I would like to know if jointed object(s) can be removed/destroyed?
Any assistance is greatly appreciated.
Thanks!