I have flex sdk 4.6 installed and I want to compile AS3 class that uses FXG file for simple graphics.
I have and fxg file called Speaker.fxg and I tried to import it like a package
import Speaker;
But when compiling it returns
Error: null
Also tried this
[Embed(source='Speaker.fxg')]
private var Speaker:Class;
private var sp:Sprite = new Speaker();
and this
[Embed(source='Speaker.fxg')]
private var Speaker:Class;
private var sp:Speaker = new Speaker();
and keep getting this error
Error: no transcoder registered for mimeType 'text/fxg'
[Embed(source='Speaker.fxg')]
^
/FXG/FXGSpeaker.as(11): col: 3: Error: Unable to transcode Speaker.fxg.
what do I do wrong?
or maybe is something with the fxg itself, here is the xml code
<?xml version="1.0" encoding="utf-8" ?>
<Graphic version="2.0" viewHeight="200" viewWidth="200" xmlns="http://ns.adobe.com/fxg/2008" xmlns:fxg="http://ns.adobe.com/fxg/2008" xmlns:d="http://ns.adobe.com/fxg/2008/dt">
<Library/>
<Group id="speaker_mc">
// internal graphic part
</Group>
</Graphic>
I used the fxgeditor air app from here http://fxgeditor.7jigen.net/
I also tried using A. Ilustrator exported fxg file and it compiles but the swf is blank
I never tried to do it in a pure AS3 project, only MXML. Here are some things I found:
I've uploaded an example project: http://www.filedropper.com/frameworklessfxg it should explain it better, I hope.