Hi,

   This is possibly due to rounding errors.

If you want the components to remain the same size, you should set the size of one using the size of the other...

   selectedImage.width *= 1.1;
   imgWidthVar = selectedImage.width;

   etc.

   Glen

SJM - Flash wrote:
Hi Guys

Im writing an application where you can manipulate images increse/decrease size rotate flip etc... but i need to keep the actual image size in memory for outputing (following on to my 'Reading position info X, Y, H & W' question).
Im trying to set the values for the actual image so when its rotated i still 
have the correct height and width to output (as the box width/height will now 
be bigger than the image height/width).

The height and width are both set from the same XML source; W: 100 & H: 80

////// START OF FLOW

Push the increase button, here is the code from the button....

     selectedImage.width *= 1.1;
     selectedImage.height *= 1.1;
     imgWidthVar *= 1.1;
     imgHeightVar *= 1.1;


The image and bounding MC change in size, here is the Trace info of the values 
(please note there has been no rotation)...

     IMGAGE W: 110 H: 88
     BOX W: 110 H: 88

     IMGAGE W: 121 H: 96
     BOX W: 121 H: 96.80000000000001

     IMGAGE W: 133 H: 105
     BOX W: 133.1 H: 106.5

     IMGAGE W: 146 H: 115
     BOX W: 146.4 H: 117.15

////// END OF FLOW

Whats going wrong? Both image and box H/W should be identical

Thanks in advance
SJM
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--

Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to