1 Reply Latest reply on Jul 10, 2007 5:19 AM by StefanGr

    Scaling the Loader DisplayObject

    buabco Level 1
      I guess this might be a bug, but since I've been fighting this for a hole week I've decided to post my findings here hopefully someone will be able to explain the inner workings of the flash display engine or whatever is doing things wrong.

      My problem is that I'm loading an image with the Loader component and I want to scale it really big, lets say scaleX = 500, in fact for the sake of it I wanted to know how big could it go.

      I was playing with a small image so I reached the limit in about 64 X scaling factor, after witch the image was not displayed any more. I didn't got an error, the image just disapeared.

      So I worngly thought that this was the limit for the scaleX property and started looking for workarounds to the problem, like cropping little pieces of it or stuff like that. (I couldn't have taken a more wrongly approach anyway).

      After a week of looking for answers still thinking this was the limit, I started playing with images with different sizes and realized that the scaleX maximum was different for each image. But still there was one thing in common, it seams that a Loader can't have a bigger height than 15872 pixels, after this it's not displayed any more.

      I was still thinking ok so this is flash limit 15872 pixels height is pretty big aniways... but then I made an experiment that startled me... I picked up the loaded image, turn it into a bitmapData and drawed it into a Shape with bitmapfill... and guess... THERE IS NO LIMIT TO HOW BIG YOU CAN MAKE THE SHAPE...... (At least I went on until only 1 pixel was visible)

      So I've wasted my time the hole week trying to work around the limit when it seems that this limit only applies to the Loader object.

      Would this be a bug on the way flash displays this object instead on how it display a Sprite for example? or are there some considerations you should have when putting stuff on the screen?

      I hope someone can solve this mystery.