Shared Library Problem (Library file loads twice)
What I'm trying to do:
Share a button in one Flash file for use in an imported Flash file.
The problem:
My first Flash file is loaded twice for some reason: once for the initial load, and again when the second, imported file calls on the shared library items.
The players:
FLA/SWF - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> (104k)
FLA/SWF - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> (54k)
SWF - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">loading</span> (5k, preloader)
BT - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span>, with MC <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> inside the button
The details:
The preloader, <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">loading</span> loads 104k worth of data, all of <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> shows up. It is sharing a button (see below) in its library, <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span>.
Within <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span>, <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> then loads. The preloader loads 54k worth of data, the entirety of <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span>.
Here's where the problem occurs:
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> has loaded correctly; the preloader is in the first frame, so we know this to be true.
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> is completely loaded; the file is 54k, and 54k are shown to be loaded as seen in the preloader.
However, after loading, when <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> is to go to Frame 2, it chokes. It takes twice as long as <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> to load (therefore roughly 108k), before Frame 2 shows up.
After about 20 seconds on a 56k modem, everthing shows up and procedes normally, happily ever after.
What I'm pretty sure is causing the problem:
When <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> goes to display the shared button on Frame 2, I'm pretty sure it's loading <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> again (104k), in order to get access to its shared library. (Even when I delete the large image so <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> is only mere bytes, it still acts like its loading about 104k.) This is obviously no good.
Therefore, the million-dollar question is:
Why is my shared library loading twice, when it's shared? In other words: How can I share the library items in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> so that they can be used in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> without loading the first file all over again?
Symbol linkage:
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span>:
[x]Export for runtime sharing
[x]Export in first frame
URL: tour.swf
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> (<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> is an animation that plays when the user rolls over <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span>):
[x]Export for runtime sharing
[x]Export in first frame
URL: tour.swf
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span>:
[x]Import for runtime sharing
URL: tour.swf
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span>:
[x]Import for runtime sharing
URL: tour.swf