Hi there ^^
I’ve some dialog boxes whose background scales pretty bad, so in flash i used a 9scale grid to only stretch the center part of the box, here’s how it’s in flash:
The red part is the rectangle for the 9scalegrid property (it’s not exported in the game) so you can see if i’m doing something wrong.
That’s the code for the red rectangle.
_background.scale9Grid = new Rectangle(32, 28, 141, 3);
But that’s the result i’m getting once the background of the box is stretched: (the corners are streched but they shouldn’t )
Is it not supported for the html5 export ? or am i doing something wrong ? At first i thought the gradient was the cause, so i changed to an unified color but the issue is still there .
I was trying to trace where the render code would be for (what I assume is) IBitmapData where it’s called after being set to dirty once the scale9Grid mode or other parameter is set.
Are there any high level notes/thoughts on how difficult would this be to implement for html5 target?
I think for nine slice, you have to draw the bitmap data into a shape for each of the nine sections separately before assigning the scale9grid. Something like: