A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Flash library relative paths for assets

  1. #1
    Junior Member
    Join Date
    Jul 2014
    Posts
    3

    Flash library relative paths for assets

    I'm having a stubborn issue, and I'm hoping someone knows how to beat it.

    I have PNG assets in my library for a template project that is meant to run on local machines (not on the web), and the PNGs need to be update-able by copying the project folder, and replacing the images in their folder structure with images that are named as the originals are. I need relative paths in my Flash library, but I cannot find an option to change the path from absolute to relative. Through messing about with the import settings, I have noticed that occasionally, and apparently randomly, my path will change in the way I desire. It's clearly possible. Does anyone know how to do it on purpose?

    I am including screenshots for the import box of two separate files, one with a relative path like I want, and another with an absolute path. Strangely, the setting seems to change without reason when I switch away from the Flash window. Any brilliant thoughts? Thanks.

    pathIssue.jpg

  2. #2

  3. #3
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    Thanks, but I've looked at that previously. When I publish as an XFL, Flash creates a directory for each module of the template and recreates all of the assets. I have been asked to create a system where all of the image assets are in a particular folder structure that is more compact, and easier for my illustrators to use, than what results by publishing as an XFL.

    Clearly what I want to do, can be done, because some of my files have the desired path.

  4. #4
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    In case anyone else needs this answer, here's the only solution I've found to this issue. It should be easier than this. If anyone finds a solution that can be accomplished inside Flash, let me know. I make no promises! Make a copy of your file before delving into this.

    Open your FLA inside WinRAR.

    Extract the DOMDocument.xml file.

    Change your library image path names inside that file.

    Save the file, and replace it in WinRar.

    Open the FLA in Flash. Image paths are all now as relative as you desire.

    Enjoy!

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    I was unable to extract the DOMdocument.xml when opening the fla with winrar or when changing the fla extension to zip and trying.

    This guy has some info http://www.leebrimelow.com/the-xfl-f...mat-explained/
    Last edited by fruitbeard; 08-02-2014 at 03:16 AM.

  6. #6
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    I've noticed that when you change DOMdocument.xml to the relative paths and then update your images in the library it changes the path back to where it originally came from.

    Why don't you have php write the image list for you ( or manually do it if it's only a few images) and import the list -> array -> load images, thus maintaining your path integrity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center