I'm currently working on a SWF that is being built using the open source Flex 4.5.x SDK. Part of the project requires that I import graphics in FXG format. Since this is my first time handling this kind of import, I decided to build a sample in the Flash IDE (the FXG document was a simple export from AI):
var fxgLoader:URLLoader = new URLLoader();
trace("fxg file loaded!");
trace("begin loading fxg file...");
trace("begin parsing fxg xml data...");
var groupList:XMLList = fxgData.Group;
Unfortunately, the groupList variable does not appear to be getting the correct scope because it keeps returning 0 instead of 7. Is this the best way to undertake this kind of import or is there a more efficient way?
Thanks for your help!
Thanks for getting back to me so quickly. This begs the question then, should I be doing SVG imports instead or is FXG the better file format to work with?
I am not expert of these formats but it depends on what you are trying to do
if you need to load at runtime then (according to my previous post) you can't use FXG
if you can compile the FXG into your code i personally would do that. all the fxg components are comparable flex components you just have to adjust the namespaces and remove some of the properties. or you can use the method that's mentioned in the second of my 2 previous posts