Hi there,
I have some problems with Bitmap displaying properly loaded image, when providing variables as width and height in the constructor as opposed to numbers, example:
if(_bitmapData) {
_bitmapData.dispose();
}
_bitmapData = new BitmapData(_loader.width *_scaleFactor, _loader.height *_scaleFactor, false, 0xFFFFFF); //
[*]
// _bitmapData = new BitmapData(1280, 1519, false, 0xFFFFFF); // [**]
// trace(_bitmapData.width, _bitmapData.height) // traces: 1280, 1519
_bitmapData.draw(_loader, new Matrix(_scaleFactor, 0, 0, _scaleFactor, 0, 0));
_bitmap.bitmapData = _bitmapData;
Running the app with this code cuts away half of the picture from right and half of the picture from the bottom. Since the BitmapData is filled with solid white background, the clipping is clearly visible.
When line marked with
[*] is commented out, and line marked with [**] is uncommented instead, the whole picture displays and all is just as expected.
The only difference between those two lines of code is, that in line
[*] are used some properties+variables, and constants are used in line marked with [**].
I have no idea, why this is happening… anybody having the idea, please enlighten me!
I am using Flex Builder 2.0.
thank You!