Copy link to clipboard
Copied
I have an application that uses extensive resources (XML files - "assets") that are lazy-loaded (only when needed).
I am using several "library projects' for support of OSMF and mapping, so I'm familiar with those methods.
My workflow will be MUCH easier if I can put my assets outside my application project (sharable among many applications).
I do not care if they reside in something like a library project, or if they just reside on the file system. I need, of course, to be able to export a release for a server (Apache).
Oz
It's probably in the Project Properties somewhere, I just can't figure out where.
Two approaches:
1. Create a folder say, c:\shared_assets. In all projects that you want to use them, you could add c:\shared_assets to the source path via Project properties -> Flex Build Path -> Source Path.
OR
2. You can use the embed directive to embed any file and access its contents:
[Embed(source="test.xml")] var testXml:Class; private function init(): void { var xml:XML = testXml.data as XML; Alert.show(xml.toXMLString()); }
Create a library project. In that, create a class with public st
...Copy link to clipboard
Copied
Two approaches:
1. Create a folder say, c:\shared_assets. In all projects that you want to use them, you could add c:\shared_assets to the source path via Project properties -> Flex Build Path -> Source Path.
OR
2. You can use the embed directive to embed any file and access its contents:
[Embed(source="test.xml")] var testXml:Class; private function init(): void { var xml:XML = testXml.data as XML; Alert.show(xml.toXMLString()); }
Create a library project. In that, create a class with public static constant to these Class objects.
Copy link to clipboard
Copied
Thanks. Approach 1 suits me better and I'll try it. I'm lazy-loading assets, since they are large.
Oz
A couple of months passed. I tried approach 1 and it worked first time. Thanks.
Message was edited by: ozDiGennaro