I'm working on a Flex/AS3 game and I've noticed a weird bug. Some components will fail to appear when added to the app. Which components seems random-- for example a new HBox() might appear okay, but a custom component that is simply an extension of HBox might not show up.

After a lot of trial and error, I discovered the problem only shows up if I use the addition assignment operator or increment operator on a bindalble variable during the game's main EnterFrame loop.

For example:

PHP Code:
[Bindable]
public var 
entitiesUpdated:int 0;

private function 
onEnterFrame(e:Event):void
{
        
// This line causes the bug:
    
++this.entitiesUpdated
        
// These don't:
    
var updated this.entitiesUpdated;
    ++
updated;
    
this.entitiesUpdated updated;

What's going on here?