WCK - how to key control your wck.BodyShape character?

Hello!

First of all, thank you all guys for your awesome work :) Really!

I downloaded the Alchemy port and check the Demo file provided.
I recreated the platform character the demo file came with, but I am still a newbie and I can't figure-it out on how to move a game character when my hero extends the wck.BodyShape class. In the provided demo file the game hero extends the shapes.Box class, and everything works like a charm...

Here is how the demo file moves the BoxMan character, but that extends shapes.Box class:
http://github.com/jesses/wck/raw/master/demo/BoxMan.as

But my hero is composed of multiple shapes, I read the WCK wiki and I know how to create the compoundShape object, but I cannot make-it respond to key Events following the provided BoxMan.as example.

Any input is huge appreciated :)
Thank you again!

Have Fun!
Your "hero" can extend BodyShape, that's fine. If you copy over the methods from BoxMan it should work similarly.

You probably aren't getting contact events though. Do you have "reportBeginContact" and "reportEndContact" set to true on your shapes? Depending on how you set them up you may have missed this step.

EDIT: Also make sure the Input class is initialized. If your document class extends wck.WCK this is handled for you.
Hello again.

Tnx Mayo for the advice :) However the problem is only half solved:

My group object does not responds to events indeed but I think is because of the listenTo method from contacs! Here is my class: http://www.gamez-factory.com/as/MyHero.as

My editor spits an error on this line:
Code:
this.contacts.listenTo(this);

Error: Incompatible types BodyShape and MyHero
and the error refers on the "this" from listenTo.

I also mention that my object has the class field pointed to "com.gamez.factory.MyHero" and the Base Class field empty. Also the component definition class field points to wck.BodyShape and my document class extends WCK... so the flash library part should be ok I'm guessing...

Again, any input is much, much appreciated !

Have Fun!

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