generally, 9scale is used for bitmap images; i dont think its a good idea to use a swf as a skin (due to performance).
if you absolutely need the art to be vectors then you could use 9 seperate bits of art and set them up so they scale in the same way as a scale-grid.
Thanks for replying Lee.
The thing that makes me unsure of that is that you can apply 9 slices to a simple vector symbol in Illustrator, copy it into Flash Pro and it preserves the scale 9 when you resize in Flash Pro, even at runtime.
I even tried doing just that; making Flash file that just had a movie clip that had scale-9 working properly, and which filled the stage area using things like StageScaleMode.NoScale, StageAlign.TopLeft, and a handler for stage resize events.
It worked when run on its own, separate to Flex, but then I realised it would be unwise to set Flex's stage properties from an embedded swf, and without that, swf's only scale (not truly resizing).
seems to indicate that bitmaps and other fills are supposed to stretch normally, ignoring scale 9, which would confirm my observations.
I feel the same way about using swfs in skins. I just don't know how I'm / we're supposed to achieve this 'nicely'.
have you tried adding 9 seperate bits of art directly to the skin class? doing it in flash pro and then exporting to flex wont work because flash pro wont add any of the flex component lifecycle stuff.
or you could try converting your artwork to a flex component (in flash pro) and then using that in flex: http://help.adobe.com/en_US/flash/cs/using/WSFD77A256-0DE1-46c7-86FB-CC4A8AE2EAA6.html#WS5 F9A13A1-03CB-4a01-B467-0272D23A12D0
apologies if i am teaching your grandma how to suck eggs...
No thats great. There's no room for pride when you're that stuck on something.
Thanks so much. The second part of you post is the answer I was looking for. I didn't know you could do that at all.
To clarify, for other people looking for this:
Basically, if you can get an Illustrator symbol with scale 9 working in Flash Pro (which isn't too hard, however there are some scale 9 quirks), then you can just convert it to a Flex component (Flex Component Kit extension required) using Commands -> Convert Symbol to Flex Component.
Then publish your flash file to a swc, reference it in your Flex project and instantiate the component straight into the MXML skin.
And behold, scale 9 works as it should.