Filling a hypeDocument.customData array efficiently

Looks like we got the same answer...

 window.pieces = document.getElementsByClassName("piece");
 window.starting = [];
 for (i = 0; i < pieces.length; i++) {
      var x = hypeDocument.getElementProperty(hypeDocument.getElementById(pieces[i].id), 'left');
      var y = hypeDocument.getElementProperty(hypeDocument.getElementById(pieces[i].id), 'top');
      starting.push([pieces[i].id, x, y]);
      hypeDocument.getElementById(pieces[i].id + "_hype_pat").childNodes[0].setAttribute("width", w);
      hypeDocument.getElementById(pieces[i].id + "_hype_pat").childNodes[0].setAttribute("height", h);

 }

The main differences are that you use the "hypeDocument.customData" API and that my pieces use vector shapes. Automatically selecting the pieces by class name is a little bit more involved.

But, it is most certainly is tested now. You can try it yourself...