You can directly attach an SVG resource to Flash sprite:
http://www.streamhead.com/vector-vs-bitmap-side-by-side-svg-png-in-flash/

        public class Test extends Sprite {

                [Embed(source='library/star.svg')]
                private var starSVGClass:Class;
                private var starSVG:Sprite = new starSVGClass ();

Adobe docs:
Embedding SVG images
Flex supports importing Scalable Vector Graphics (SVG) images, or a
GZip compressed SVG image in a SVGZ file, into an application. This
lets you import SVG images and use SVG images as icons for Flex
controls.

Flex supports a subset of the SVG 1.1 specification to let you import
static, two-dimensional scalable vector graphics. This includes
support for basic SVG document structure, Cascading Style Sheets (CSS)
styling, transformations, paths, basic shapes, colors, and a subset of
text, painting, gradients, and fonts. Flex does not support SVG
animation, scripting, or interactivity with the imported SVG image.

For example, you use the [Embed] metadata tag in ActionScript to embed
an SVG image, as the following code shows:

[Embed(source="logo.svg")]
[Bindable]
public var imgCls:Class;


On Thu, Mar 10, 2011 at 4:41 PM, Henry Minsky <[email protected]> wrote:
> SVG is not currently supported.
>
> The prototype code in that JIRA task uses a contributor's modified drawview
> that parses SVG pretty well. The
> goal is to allow the new components to be able to use SVG resources.
>
> Maybe I should check it in, with the warning that the API is not finalized.
>
> I would really like to use the native SVG rendering where it is available in
> DHTML, rather
> than our own interpreted library routine. Do you know if there a standard
> SVG rendering solution
> for Flash/AS3 that we might want to use use ? It would be very nice not to
> have to maintain
> our own SVG rendering library if possible, as it seems that all major
> browsers are supporting
> it as of IE9...
>
> On Thu, Mar 10, 2011 at 9:24 AM, Laszlo Developer
> <[email protected]> wrote:
>>
>> Is it currently supported to attach SVG resources to a view? Modern
>> browsers have support for that, and it's easy to do that out of AS3 as
>> well.
>>
>> There is a test folder "svg', but not much content:
>> http://www.openlaszlo.org/svn/openlaszlo/trunk/test/svg/
>>
>> You have started tests using SVG as a resource, but that seems to be
>> only a proof-of-concept:
>> http://jira.openlaszlo.org/jira/browse/LPP-8913
>>
>> Is that something which is going to be added to the platform?
>
>
>
> --
> Henry Minsky
> Software Architect
> [email protected]
>
>
>

Reply via email to