Boersnoes
05-05-2006, 02:12 PM
Today I ran into a rather stupid "feature" of jsfl.
Apparently instances have a .left and a .top property, but no x or y property. This way I can get the position relative to the instance's registration point and stage origin, but not the position of the instance itself.
Practicly I need to know if an instance is located at 0,0.
But although I have put it at 0,0 in the editor, i get 0,-2 from the folowing code:
alert(fl.getDocumentDOM().timelines[timeline].layers[layer].frames[frame].elements[element].top);
alert(fl.getDocumentDOM().timelines[timeline].layers[layer].frames[frame].elements[element].left);
Any ideas how to solve this?
Apparently instances have a .left and a .top property, but no x or y property. This way I can get the position relative to the instance's registration point and stage origin, but not the position of the instance itself.
Practicly I need to know if an instance is located at 0,0.
But although I have put it at 0,0 in the editor, i get 0,-2 from the folowing code:
alert(fl.getDocumentDOM().timelines[timeline].layers[layer].frames[frame].elements[element].top);
alert(fl.getDocumentDOM().timelines[timeline].layers[layer].frames[frame].elements[element].left);
Any ideas how to solve this?