开发者

How to use relative path for assets in Flash library?

When I drag and drop images in flash library, the path is sometimes relative (./somefolder/someimage.png), and sometimes it is absolute (D:\blah\somefolder\someimage.png).

How can I use only relative paths in flash library in order to be able to update all images f开发者_Python百科rom any computer and/or from any folder ?

Thank you in advance.


I've got CS5, project saved as uncompressed *.xfl, my project directory structure:

  • "/" root project dir, (i.e. c:\MyApp) contains main *xfl project file and other system folders /bin /META-INF and so on

  • /images - all art there, pngs, jpgs and so on

I go to IDE, File->Import->Import to stage, then I select couple images (using shift) from /images folder

They appear in Library. Also they automatically copied to system /LIBRARY folder

In main project XML file (DOMDocument.xml), there are lines such as (cleaned):

<DOMBitmapItem name="Buttons/menu-button!.png" ....... sourceExternalFilepath=".\LIBRARY\Buttons\menu-button!.png" ......./>

As you can see paths are relative. I do not use *.fla projects, but you can try this scheme! My project path does not contain spaces.

Hope this help

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜