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

After installing Flash CS5, I've got same weird behavior for BoxMan again. Now I start wondering, that it is system related.
I'm on XP 64bit, can anyone confirm, that building demo.fla sample works absolutely fine after 64bit system build?
mayobutter wrote:
Frnk wrote:
If you're just looking for world coordinates though, you can use:

Util.localizePoint(world, this);


Awesome, thats what i was looking for, thx
I posted this in Games/Applications but also wanted to mention it here since it's a good demonstration of what can be built with this library:

http://sideroller.com

This is an updated demo for the game I'm developing. Make sure you try holding shift!
I encountered some problem for the game logic
Working on the logic sensors which are drawable shapes in the editor (blue boxes), i have done some compoment entries that allow one sensor to do multiple events.

For example here is an eventTrigger1 set to "enter" which means that event1 gets executed as soon as the collisionTarget object enters the sensor. event1 can contain any function call, in this case event1 contains bubbleTalk;Hello;10
Via
Code:
this[array[0]].apply(this, array.slice(1, array.length))
, it is converted to call the function as this.bubbleTalk("Hello",10).

*update*
Actually i solved this by moving all the component inspector entries to an XML file instead
Another question would be: how can i override the default values for different library objects ?

For example, there is Box20 which is by default type="Dynamic" isSensor=false
I would like to have Sensor (child of Box) with default values type="Static", isSensor= true.
If i change those in component definition it doesnt store them
I guess i would have to override the default values in the Sensor class ?
OMG
sometimes flash is annoying

For some reason, all my inspectable properties were 0, when accessed in AS3.
However in the editor component window, the values still appeared normal.

The reason was that i had added to the constructor:
Code:
   this.isSensor = true;
        this.type = "Static";


Took me 3 hours to find out that this actually sets all my inspectable properties to Null (only when accessed in actionscript!!!) 😛
I had never even guessed that this was the reason, i thought it was a bug in the component inspector, memory leaks etc...
OMG
It would render all my code unusable, if it would be true in most cases.
Currently, I use many inspectable values in AS3 in constructors, and that works fine.
Maybe you are using some buggy build?
I, personally, rolled back to some April's 15 build, as the newest was too buggy for me.
Im using 4637623
The problem occured in a sensor class that extends box

With constructor i mean the pseudo constructor
Code:
      public override function create():void
      {   
         this.isSensor = true;
         this.type = "Static";

You can get around that problem if you just set these properties in the component inspector instead - as usual.

It would have been nice though to give some classes predefined properties so you won't have to set them for every instance in the editor. Maybe there's another way to do that..
@mayobutter, i like the new game build. was curious about a few things.

I'm planning to build a rolling side scroller soon.

1) did you slice up the world to make the world so big? (turning off whats off screen?)
2) what method did you use to make sticky mode, and will it be available in wck?
3) i wasn't planning to rotate the world, but i would love to see the way you set it up, my guess is oriented gravity slices, and you orient camera to gravity.
From what i saw, ContactEvents are either begin, end, pre-solve and postsolve
What i am missing though is a ContactEvent listener called as long as an object is touching the sensor. So it is intended to report contacts during the time between the ContactEvent.BEGIN_CONTACT and ContactEvent.END_CONTACT.

The only thing i could think of is an Event.ENTER_FRAME listener with an event handler looping through all contacts. It seems quite clumsy. Is there a better way to do this ?
Code:
private function onEnterFrame(e:Event):void{
   if (!contacts.isEmpty()) {            
       contacts.forEach(function(keys:Array, c:ContactEvent) {         
       if (c.relatedObject.name == collisionTarget.name) executeEvent("middle");
   });
   contacts.clean();
}


Cheers

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