Jump to content


add includeNested option to prependURLs for loaders in xml?

Recommended Posts

Looking at the source code for XMLoader, it doesn't appear you can use the includeNested option with prependURLs for loaders defined in xml - includeNested is always false. Would it be easy to allow includeNested to be defined in the xml also? It would be very useful. For example, I have a hierarchy of folders containing various different resources I need to load. I'm defining the loaders I need in an xml file. It would be nice if my xml file could mirror the folder structure that contains my resources, like:




As things stand, I have to specify the full path to the deepest subfolder in each deepest-nested LoaderMax node.


I assume the "load" attribute applies to nested loaders - I assume because the outermost node has load="false", none of the inner loaders will load. Similarly, you might add an attribute "nestPrependURLs", which itself applies to nested loaders. Then the first line of the above xml becomes:


Link to comment
Share on other sites

To clarify, in the absence of nestPrependURLs or the like, the xml has to be:




Link to comment
Share on other sites

Well, it's not a terrible idea, but I'm hesitant to add this sort of feature because:


1) It seems like it would be so rarely used (you're the first person to ever request it)

2) It bloats the API and file size slightly

3) If I made this addition to prependURLs, I'd also need to make it to replaceURLText for consistency, so the API/size bloat doubles.

4) You can already accomplish what you're after with the current API, but it just requires a little more text. It doesn't seem like a huge price to pay for this edge case, but adding the feature would impose a few negative consequences to everyone even if they don't use that feature.


See what I mean? If I got a lot more people asking for this, I'd reconsider but at this point I'm very hesitant. Again, that doesn't mean it's a bad idea at all. I can totally see why you'd request it. I hope you understand why I'm so protective of the API and file size. Things can get out of hand quickly if I add every convenience feature that people request.

Link to comment
Share on other sites

  • 2 weeks later...

I'm absolutely in favor of having a way to next prependURLs.

Currently my structure looks like this:


There are instances where I need to load individual items as well as entire groups. I never plan to load every item and every group at once but was planning to use the outer most LoaderMax as a way for the client to easily alter the main path for all of the swfs (which there may end up being quite a large number of). Being able to nest prependURLs would be nice. Not a "must have" but definitely convenient.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.