Contact List Problem

Code:
public function Destroy_box(e:Event) {
         var contact:b2Contact=the_world.m_contactList;
         if (contact != null) {
            if (contact.GetShape1().GetBody().GetUserData()=="Ground") {
               var body3=contact.GetShape2().GetBody();
               the_world.DestroyBody(body3);
            }
         }
      }

I want to destroy some boxs when contact with the ground
but it have a error:
Code:
1178: Attempted access of inaccessible property m_contactList through a reference with static type Box2D.Dynamics:b2World.


How can i solve it?
Are you grabbing the uber-latest version off of SVN? I believe they changed the m_contactList variable so that it's no longer public.

Of course, that being said, I don't know how you are supposed to access the contact list, besides using the contact listener. Boris would probably know.
At the moment, the contact list is not public, as we were getting too many complaints about it's confusing use, so there's some slow work on revamping it.
It's not banned though. In AS3 it has been moved to a different namespace called b2internal.

You need code something like:
import Box2D.Common.b2internal;
using b2internal;
at the top, and all the old internal methods become available. (better to use it in specific cases, though).
Hi All,

I follow http://www.box2d.org/wiki/index.php?title=Listening_to_contact_events_in_Box2D_AS3
to do and I is okey for Destory my boxs when it hit the ground...
but sometime, there have error... and the SWF out of work...

Quote:
TypeError: Error #1009: 無法存取 Null 物件參考的屬性或方法。
at Box2D.Collision::b2BroadPhase/MoveProxy()
at Box2D.Collision.Shapes::b2Shape/http://www.box2d.org/ns/b2internal::Synchronize()
at Box2D.Dynamics::b2Body/http://www.box2d.org/ns/b2internal::SynchronizeShapes()
at Box2D.Dynamics::b2World/http://www.box2d.org/ns/b2internal::Solve()
at Box2D.Dynamics::b2World/Step()


What's the problem ??
THX
I upload the file
and hope everyone can help me~ solve the problem.

http://www.yourfilehost.com/media.php?c ... FYP_SA3.as
http://www.yourfilehost.com/media.php?c ... YP_SA3.fla

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