Thanks, that did it!
One thing that's a little odd: This compiles:
[Embed(source=MyIcon.swf)]
public static const MyIcon:Class;
but this:
import mx.core.MovieClipLoaderAsset;
[Embed(source=MyIcon.swf)]
public class MyIcon extends MovieClipLoaderAsset {
...
gives an Unable to transcode MyIcon.swf compiler error.
This is not a big deal, I should be able to work around it, but I wonder why I
can embed the SVG file in that manner, extending SpriteAsset, but not the SWF.
The Flex 3 Developer's guide says that when you embed a SWF file the class
created is a subclass of mx.core.MovieClipLoaderAsset. I called describeType
with an instancof the the MyIcon class that represented the embedded SWF, and
it shows that indeed it is a subclass of MovieClipLoaderAsset.
From: Johannes Nel johannes@gmail.com
To: flexcoders@yahoogroups.com
Sent: Sunday, October 16, 2011 2:39 PM
Subject: Re: [flexcoders] Embedded SVG scales like bitmap.
export it as a swf
On Sun, Oct 16, 2011 at 6:46 PM, Dave Glasser dglas...@pobox.com wrote:
I drew a simple irregular polygon in Adobe Illustrator and saved it as an SVG.
I embedded it in my Flex app as a SpriteAsset. I then set it as the skin (all
states) for a button. When I set the button size much larger than the original
size of the SVG (approx 75X75 pixels), the sides of the polygon show severe
stair-stepping. Is there anything I can do to make it behave like a scalable
vector graphic in my application, rather than a lo-res embedded bitmap?
--
j:pn
\\no comment