Is it possible to resize a SpriteAsset without adding it to the display list?

Posted by Sophistifunk on Stack Overflow See other posts from Stack Overflow or by Sophistifunk
Published on 2010-03-31T06:59:45Z Indexed on 2010/03/31 7:03 UTC
Read the original article Hit count: 361

Filed under:
|
|
|

Hi guys,

I have an embedded image asset (with a scale9 grid), and I'm trying to get the bitmapdata when it's resized, but I can't seem to do this without adding it to the display list.

I try this:

spriteAsset.setActualSize(w,h);
spriteAsset.width = w;
bmd.draw(spriteAsset);

But when I then draw out the bitmapdata with graphics.beginBitmapFill(), I just get the original un-stretched image.

Any pointers? Or do I need to take 9 separate BitmapData images and make 9 separate bitmap fills?

Cheers, -Josh

© Stack Overflow or respective owner

Related posts about as3

Related posts about actionscript-3