Something I’ve been having trouble with over multiple flashpunk projects is being able to import the values of Booleans from ogmo files. They always come out as “true” regardless of how I parse it:
<blocks>
<block_blue id="1" x="256" y="384" swappable="False" hasTimer="False" hasButton="False" switchType="circle" timerCounter="1" />
</blocks>
//Add blue blocks
var blockList:XMLList = levelData.blocks.block_blue;
for each (var bb:XML in blockList)
{
var hi:Boolean;
hi = bb.@hasTimer;
trace(hi);
}
I’ve tried using Boolean(bb.@hasTimer) to type it but still the same result. Everything else seems to import correctly. Any help would be appreciated. Cheers.