Hi,
I’ve found that sprite scaling works strangely when I use quite small or big numbers.
Here is a code which works under a limit but above that the scaling just stops
there are two rectangles, a big and a small in the big.
at the beginning it scales and then it just stops.
var spr1:Sprite = new Sprite();
var spr2:Sprite = new Sprite();
spr1.graphics.clear();
spr1.graphics.beginFill(0xff0000);
spr1.graphics.drawRect(-150,-150, 300, 300);
spr1.graphics.endFill();
spr2.graphics.clear();
spr2.graphics.beginFill(0x00ff00);
spr2.graphics.drawRect(-20, -20, 40, 40);
spr2.graphics.endFill();
spr2.scaleX = 0.0001;
spr2.scaleY = 0.0001;
spr1.addChild(spr2);
addChild(spr1);
addEventListener(Event.ENTER_FRAME, function(event:Event)
{
spr1.scaleX += 1000;
spr1.scaleY += 1000;
});
do you know why?
or I missed something?
thanks in advance
Viktor