HaxePunk / tiled

Tiled TMX import for HaxePunk
50 stars 18 forks source link

Creating a New TmxEntity Freezes Flash Player #27

Open SolarLune opened 10 years ago

SolarLune commented 10 years ago

Hello. I'm getting a bug in which the Flash Player freezes if I create a new TmxEntity and compile to Flash. I'm using the latest Haxe (3.0.1) and HaxePunk downloaded from HaxeLib (2.5.1). The Tmx Library is also from HaxeLib (1.0.2).

mikehuebner commented 9 years ago

I am having a similar issue, it seems this library uses an outdated XML version according to Tiled. Trying to come up with a solution but so far no luck.

It requires the height and width of the object (as if they were individual objects) for it to read the file. So instead of have a group and a subgroup you need to do each group individually and then edit the XML to apply the W x H to each overall group.

New Format

<objectgroup name="solid">
  <object type="solid" x="63" y="710" width="187" height="22"/>
  <object type="solid" x="226" y="743" width="186" height="20"/>
  <object type="solid" x="424" y="748">
   <polyline points="0,0 42,31 114,37 182,-11"/>
  </object>
 </objectgroup>

Old Format (this lib requires)

<objectgroup name="solid"  width="187" height="22">
  <object type="solid" x="63" y="710" width="187" height="22"/>
 </objectgroup>