1 Reply Latest reply on May 23, 2006 8:23 PM by tonyhigham

    Author-time shared assets

    tonyhigham Level 1
      I’m having some major issues with author-time shared assets in Flash 8. I will try to be as specific as possible, so bear with me. I have a large project that has an accordion menu system in the main file (Main). We’ll focus on one of the accordion’s children for simplicity. There is a loader in this child that loads an external swf (Module), which works just fine.

      However, Module frequently uses the window component, which references movies in its library, and this is where the trouble starts. Main loads Module without incident, but when Module tries to initialize one of its windows, which references a symbol (Dialogue) from its library, I get an error saying that the symbol can’t be found. Dialogue is in fact in Module’s library, and no error occurs when Module runs by itself, only when it is loaded into Main.

      Now this is a pain, but I can get around it by importing Dialogue into Main’s library. I don’t think this ought to be necessary, but whatever. This makes everything run just fine, but is an issue if I change Dialogue in Module’s file. Not to fear, in Main’s library I can go to the properties of the imported Dialogue symbol, and select ‘Always update before publishing.’ Great; now my loaded swf works, and I can make changes with impunity.

      Not quite; this is where things start getting buggy. Every time I publish Main, it updates the necessary imported symbols, but also imports a bunch of random other junk from Module’s library, whole folders of stuff in fact. It imports so much junk, that Main now takes about 90 seconds to compile, instead of the usual 5 or so. But wait, the fun doesn’t end there, because among the unnecessarily imported junk are Flash components that are used in Dialogue. Not only is this dumb, but these already exist in Main’s library, and so in addition to being unnecessary, also generate compile warnings about duplicate linkage IDs, which in turn slows my compile time even more.

      Now, even with this bizarre behavior, everything works together as originally intended. However, as I’m sure you can imagine, it makes development a total nightmare when you have to wait 2 minutes to compile because you added a trace() statement. I can get around this if I don’t set that ‘Always update…’ property, and only update individual symbols when necessary. However, using this method, Main will compile quickly once, but still import all that other crap, and if I forget to delete it from the library, the next compile will be terrible.

      I know this is a long post, but this issue is killing me. I don’t know why I should even have to resort to shared assets in the first place. Dialogue already exists in Module’s library, and is exported for Actionscript with the correct Linkage ID. Everything is peachy in that regard UNTIL Module.swf is imported into Main’s Loader component.

      If anyone has any experience with this stuff, any help is very much appreciated.
        • 1. Re: Author-time shared assets
          tonyhigham Level 1
          ok, so it turns out i'm a moron. no sooner do i type up the preceeding monstrosity, than i find an interesting tidbit in the flash help files (who would ever have thought to look thre???) about problems loading v2 components into loaders. so, to make a long story short, i set myLoader.content._lockroot to true, and pass a reference to my Main _root to get around that. problem solved. so....nevermind....