# \[F8AS2\] Using shared library objects in AS

**URL:** https://forum.kirupa.com/t/f8as2-using-shared-library-objects-in-as/201590
**Category:** flash
**Created:** [September 22, 2006, 7:04pm UTC](https://forum.kirupa.com/t/f8as2-using-shared-library-objects-in-as/201590 "2006-09-22T19:04:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Andir](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Andir](https://forum.kirupa.com/u/Andir)
#### Post date: [September 22, 2006, 7:04pm UTC](https://forum.kirupa.com/t/f8as2-using-shared-library-objects-in-as/201590/1 "2006-09-22T19:04:53Z")

</div>

I think I’m finally getting the Runtime Shared Object library down. What I can’t seem to be able to do with it yet is load the objects with Actionscript.

The scenario (names modified for simplicity). I have a shared library SWF called SharedObjects.swf. In this I have a symbol named lrg\_symbol with a class assignment of as.lrg\_symbol. I right click, set linkage to “Export for runtime sharing” and “Export in first frame”. In the URL I set SharedObjects.swf. I save, compile and close this.

I then open my main.swf file and proceed to File\Import\Open External Library. Select my SharedObjects.fla and open the library from this file. I drag a copy into my Library and check the linkage. It appears to be pulling this object fromt he correct location. Now, when I open my code and try to \_mc.attachMovie(‘lrg\_symbol’, etc…) it doesn’t load. I pulled up the bandwidth profiler and see that the shared library is still loading in the background (with reduced bandwidth settings.)

So I check into preloading the SharedObjects.swf, but I feel this is only going to get me in the same boat as I was before, where I load in the SharedObjects.swf and lose all access to the main.swf. Has anyone dealt with this? How can I preload the SWF, and attach a symbol in that shared swf to my main.swf through code?
