I've been trying to embed some svg files into an AS3 project using the Embed meta tag. For example:
[Embed(source = "assets/image.svg")]
private var Image : Class;
However when displaying these files as Sprites only some of the gradients are surviving the embeding process.
From what I've found simple (2 step) horizontal gradients seem to stand the best chance of being preserved, but sometimes other kinds of gradients are as well. In one case simply rotating an object 90 degrees causes the gradient to vanish when displayed in flash.
Does anyone know a rough set of rules to use when creating svg gradient fills so they are preserved when rendered in flash?
BTW: I used Inkscape to create the images in question.
Update: Bizarrely the solution to this seems to be setting the opacity of any object in the svg file whose gradient isn't displayed properly to a value below 1. Don't ask me why this works but it does. It does however have the unwanted side effect of the objects edges not being rendered as smoothly.