Heres how to contact me: j.jonez@gmail.com
Heres what I am doing,
mc.rect1 = new Rectangle( mc, 0, 0, 90, 90 );
mc.rect2 = new Rectangle( mc, 100, 0, 90, 90 );
mc.rect3 = new Rectangle( mc, 200, 0, 90, 90 );
mc.rect1.setRegistrationPoint( {x:0,y:0} );
mc.rect2.setRegistrationPoint( {x:0,y:0} );
mc.rect3.setRegistrationPoint( {x:0,y:0} );
mc.rect1.fillStyle(0x000000, 20);
mc.rect2.fillStyle(0x000000, 20);
mc.rect3.fillStyle(0x000000, 20);
mc.rect1.drawBy();
mc.rect2.drawBy();
mc.rect3.drawBy();
What happens? All rectangles are drawn at the xy
position of rect3 rather than being x=0, x=100, x=200.
This doesn't agree with the documentation. If only one
rectangle is created and drawn the xy position is correct.
A work around is to do the following instead,
mc.rect1 = new Rectangle( mc, 0, 0, 90, 90 );
mc.rect2 = new Rectangle( mc, 0, 0, 90, 90 );
mc.rect3 = new Rectangle( mc, 0, 0, 90, 90 );
mc.rect1.setRegistrationPoint( {x:0,y:0} );
mc.rect2.setRegistrationPoint( {x:100,y:0} );
mc.rect3.setRegistrationPoint( {x:200,y:0} );
mc.rect1.fillStyle(0x000000, 20);
mc.rect2.fillStyle(0x000000, 20);
mc.rect3.fillStyle(0x000000, 20);
mc.rect1.drawBy();
mc.rect2.drawBy();
mc.rect3.drawBy();