AS3 2.1 Port (Alchemy), WCK Update and Kinematic Demos

wow i really amazed.
i tried to run the demo.fla but it gives me errors.
can someone please can help me get started with the WCK?
how can integrate it with flex 3 (for some custom elements)?
thanks it's awesome really like the platform game ;D
I found it useful to zero _ptr variable in destroy functions of b2Body and b2Joint. So that we can know if the variable is invalid. The modification is extremly simple:
Code:
//b2Body
      public function destroy():void {
//         var je:b2JointEdge = GetJointList();
         for(var je:b2JointEdge = GetJointList(); je; je = je.next) {
            var j:b2Joint = je.joint;
            if(j.m_prev) {
               j.m_prev.m_next = j.m_next;
            }
            if(j.m_next) {
               j.m_next.m_prev = j.m_prev;
            }
            if(m_world.m_jointList == j) {
               m_world.m_jointList = j.m_next;
            }
            j._ptr = 0;//HERE
         }
         lib.b2World_DestroyBody(m_world._ptr, _ptr);
         if(m_prev) {
            m_prev.m_next = m_next;
         }
         else {
            m_world.m_bodyList = m_next;
         }
         if(m_next) {
            m_next.m_prev = m_prev;
         }
         m_next = null;
         m_prev = null;
         _ptr = 0;//HERE
      }

//b2Joint
      public function destroy():void {
         lib.b2World_DestroyJoint(m_world._ptr, _ptr);
         if(m_prev) {
            m_prev.m_next = m_next;
         }
         else {
            m_world.m_jointList = m_next;
         }
         if(m_next) {
            m_next.m_prev = m_prev;
         }
         m_next = null;
         m_prev = null;
         _ptr = 0;//HERE
      }
//b2Base
      public function get valid():Boolean
      {
         return _ptr != 0;
      }

I do not think that there is need to add such code to b2World.destroy because in most cases when you destroy the world, you know it.
update:

Lots of testbed / b2DebugDraw tweaks + additions
Controllers are implemented (although a bit differently)
Buoyancy demos in WCK & TestBed
ConveyorBelt functionality for fixtures
Fixed type errors (where I could find them)
_ptr is cleared on destruction for all Alchemy objects (thanks m_roman)

PaulGene: I'm not sure what you mean by "QueryShape" - there's no function named this in the Box2D source. Care to clarify?

Stryke: Correct, there are no collisions between static & kinematic objects.

shock-value: I almost never use RayCast myself, so it's a bit foreign to me. I was able to get multiple results out of ray cast by just returning the fraction though.
I don't know if anybody else had this problem but when i run the demo.fla it doesn't compile it all.
and just run in a loop.
i ran it from flash cs4 IDE does i suppose to run it from only from flex?

i tried again i copied all the libary in the demo (so cool how you did the components) and it compiles but i get the error
VerifyError: Error #1014: Class cmodule.Box2D::CLibInit could not be found.

at wck::WCK()
at Main()

thanks
arkzai: Apparently a lot of people are experiencing this problem (the source code for the demo doesn't run). Has anyone out there been able to resolve this? I tried downloading the demo (rather than just running my local copy) and it compiles just fine.

As for your other error, I put some simple instructions up on the GitHub wiki for setting up a new project:

http://wiki.github.com/jesses/wck
i followed the set your project page
and putted the source path (the main project library) and Library path as you said
i created a "main.as" class that extends WCK

Code:
package {
   
   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.*;
   
   public class Main extends WCK {
      
      
      public function Main() {         
         super();
         stop();
      }
   }
}


but i still getting errors and nothing works
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at misc::Entity/listenWhileVisible()
at BoxMan/create()
at misc::Entity/ensureCreated()
at <anonymous>()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at gravity::Gravity/create()
at misc::Entity/ensureCreated()
at <anonymous>()
Hey im really impressed, gotta give kudos.

Ill take a look at this coz its a new year 😀
arrgg my bad, i saw BorisTheBrave's last post on this viewtopic.php?f=8&t=3986&p=19288&hilit=Query#p19288

and assumed QueryShape was part of 2.1
I also had troubles compiling the demo in flash CS4 pro. Same errors reported above, it doesnt compile the AS so it just produces a looping movie.

However i can get it to work now... but i have recently formatted my computer (win xp), updated adobe products, made sure flash player was latest version (for whatever reason firefox download a version that was slightly behind), and downloaded the latest version of the source files. Now it compiles...

Obviously stating it works after a system format isnt helpful, but maybe the updates might help some people out?
Using your contact listening method, how can I get the force of a collision between two objects?
Previously b2ContactPoint.velocity contained this information.

Edit: Another question - I think I need to edit the C code (hack to make revolute joints react slower than normal), is it possible to do this? I tried only including the 'Box2D' folder and discounting the SWC but this failed.

Amazing work btw! Many many thanks.

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