# scaleX not working?

**URL:** <https://forum.kirupa.com/t/scalex-not-working/295691>\
**Category:** flash\
**Created:** [September 3, 2009, 1:37am UTC](https://forum.kirupa.com/t/scalex-not-working/295691 "2009-09-03T01:37:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexWD](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@AlexWD](https://forum.kirupa.com/u/AlexWD)\
**Post date:** [September 3, 2009, 1:37am UTC](https://forum.kirupa.com/t/scalex-not-working/295691/1 "2009-09-03T01:37:50Z")

</div>

I’m trying to generate an animation containing all the frames from a sprite sheet. Then also append them again but flipped vertically. I have an animation class to create the animation, the stuff I wrote just gets the image from the sprite sheet and sends it to this class. But “frame.scaleX = -frame.scaleX;” isn’t changing anything, neither is “frame.scaleX = -1;”. It’s just leaving the bitmap the same…

here’s my code:

```auto
for(var i:uint = 0;i < 20;i++)
			{
				var frame:Bitmap = getFrame(i);
				if(i > 9)
					frame.scaleX = -frame.scaleX;
                                        character.appendBitmapData(i+1, frame.bitmapData);
                        }

private function getFrame(s:Number):Bitmap
		{
			if(s > 9)
				s -= 10;
			var sheetCols:int = baseSheet.width / 32;
			var sheetRows:int = baseSheet.height / 64;
			var row:int = Math.floor(s / sheetCols);
			var col:int = s - (row * sheetCols);
			var rect:Rectangle = new Rectangle(col * 32, row * 64, 32, 64);
			var pt:Point = new Point(0, 0);
			var bmp:Bitmap = new Bitmap(new BitmapData(32, 64, true, 0x00000000));
			bmp.bitmapData.copyPixels(baseSheet, rect, pt, null, null, true);
			return bmp;
		}

```
