i have got a problem, and i hope, that you can help me.
First, i have to tell, that i have an air application, which includes some Flex Library Projects. I would like to read XML file, wich is in library project folder, is it possible? I haven't got a problem with reading of files, wich are situated in application folder, but i can't find solution for access to file in library's folder. (each library project is merged into code, no RSL are used).
Thank you very much and sorry for my english
You can do that by embedding the XML in the library project.
Library project code:
public class MyClass
public static const MyXml:Class;
var obj:Object = new MyClass.MyXml();
var xml:XML = new XML(obj);
You can now use the xml instance variable inside your project code as you wanted.
I don't recommend you to use this approach to load XML data. You can do that loading the external XML file using URLLoader class instead of having it embedded in your library project.
Hope it helps!
Thank you very mutch, i absolutely forgot for the embedding of course, it works! Thx!