• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Need assets external to my application project (assets not in SWF)

Explorer ,
Feb 04, 2011 Feb 04, 2011

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.

Views

374

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Feb 11, 2011 Feb 11, 2011

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

...

Votes

Translate

Translate
Adobe Employee ,
Feb 11, 2011 Feb 11, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 15, 2011 Feb 15, 2011

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines