Project : Game in Flex builder 4 (Actionscript Project)
Language : Actionscript 3
This code
trace ("--before-- "+sprite.width + "," + sprite.height);
this.sprite.rotation = obj.rotation;
trace ("--after-- "+sprite.width + "," + sprite.height);
prints this in debug console
!!before!! 72,13
!!after!! 72,13
!!before!! 72,13
!!after!! 72,13
!!before!! 72,13
!!after!! 72,13
!!before!! 72,13
!!after!! 13,72
!!before!! 72,13
!!after!! 72,13
!!before!! 72,13
!!after!! 13,72
!!before!! 72,13
!!after!! 13,72
!!before!! 72,13
!!after!! 72,13
!!before!! 72,13
!!after!! 13,72
Obviously there are 9 instances. So 18 lines output.
Please note that the width and height getting swapped randomly for some only.
Why is this happening ?
Feeling stupid. Sometimes the rotation was 0 and sometimes 90. So its happening.