You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Flexicious.com" <fl...@gmail.com> on 2014/04/01 01:02:14 UTC

SVG Embed - works with 4.6, does not work with Apache Flex

Any reason why this would work with 4.6 but cause an error with Apache flex
(4.11, 4.12)

Description Resource Path Location Type
exception during transcoding: svgtest.mxml /svgtest/src line 16 Flex Problem
Unable to transcode sample.svg. svgtest.mxml /svgtest/src line 16 Flex
Problem

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
>
 <fx:Script>
<![CDATA[

 [Embed(source="sample.svg")]
[Bindable]
public var imgCls:Class;
 ]]>
</fx:Script>
</s:Application>

Re: SVG Embed - works with 4.6, does not work with Apache Flex

Posted by DarkStone <Da...@163.com>.
Hi,

You did it in the wrong way.

Try this:

[Embed(source ="sample.svg", mimeType ="application/octet-stream")]
public var imgCls:Class;

This should work in all flex versions including 4.6 to 4.12.

Sent from DarkStone's iPhone
2014-04-01

> 在 2014年4月1日,7:02,"Flexicious.com" <fl...@gmail.com> 写道:
> 
> Any reason why this would work with 4.6 but cause an error with Apache flex
> (4.11, 4.12)
> 
> Description Resource Path Location Type
> exception during transcoding: svgtest.mxml /svgtest/src line 16 Flex Problem
> Unable to transcode sample.svg. svgtest.mxml /svgtest/src line 16 Flex
> Problem
> 
> <?xml version="1.0" encoding="utf-8"?>
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:mx="library://ns.adobe.com/flex/mx"
> xmlns:s="library://ns.adobe.com/flex/spark"
> <fx:Script>
> <![CDATA[
> 
> [Embed(source="sample.svg")]
> [Bindable]
> public var imgCls:Class;
> ]]>
> </fx:Script>
> </s:Application>