Although gradient and bitmap shape fill styles are transformed identically in Flash and Scaleform, separate standalone bitmaps are processed differently. In Flash, when a standalone bitmap is placed in a 9-slice scaled movie clip, the player ignores any of the Scale9Grid settings unless the bitmap is explicitly cut into nine pieces by the user. Whereas, the Scaleform player automatically slices the bitmap so it is scaled correctly with Scale9Grid. This behavior greatly simplifies development and allows creation of resizable buttons and windows without manual image cutting by the artist. Furthermore, automatic slicing eliminates the anti-aliasing seams that are possible when stitching content rendered with EdgeAA. The behavior of automatic slicing is explained in more detail in the following example.
Suppose the artist creates a bitmap that represents a window background similar to the image below:
Then the artist applies Scale9Grid so that the shape of the corners can be preserved when scaling. The most obvious way to set this up is to create a movie clip and apply Scale9Grid to it as follows:
However, it will not work in Flash as expected. If you scale the resulting movie clip, it will look as if no Scale9Grid was applied:
In Scaleform this will work as expected, preserving the shapes of the corners:
Adobe Flash calculates the average scale for the image on the basis of its bounding box. This means that it is still possible to make 9-slice scaling work with bitmaps, but it requires nine separate image pieces that correspond exactly with the Scale9Grid tiles:
Scaleform does this operation automatically when playing the Flash file.
However, if the image is arbitrarily rotated or skewed, Scaleform will process it identically to Flash. An example of such “manually tiled” window is illustrated by files scale9grid_tiled.fla and scale9grid_tiled.swf.
Shapes with bitmap and gradient fill styles are displayed identically in Flash and Scaleform. Note that both gradient and bitmap fills fail to preserve the Scale9Grid transformation. In effect, the transformation is only applied to the vector shape outline, but not to the fill style content. For example: