开发者

flex: Embedding assets from XML file

I want to create something like gallerea of images. All images are defined within an XML file. The XML file itself sits in the project directory and embedded this way:

[Embed(source="xml/data.xml")]
public var testXml:Class;

The file structure looks this way

<xml>
    <item>
        <title>A</title>
        <image>A.jpg</image>
    </item>
    <item>
        <title>B</title>
        <image>B.jpg</image>
    </item>
&l开发者_开发百科t;/xml>

I am reading the XML file within the application and parse it.

The question is: Is that possible to embed these images into the application at the compile time. (So the swf will be a complete alone standing application which doesn't make any web requests, etc)


This was already answered today
Basically, embedding is done at compile-time and is not meant to be done at run-time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜