# Shared Library "ReferenceError: Error #1065"

**URL:** <https://forum.kirupa.com/t/shared-library-referenceerror-error-1065/320445>\
**Category:** flash\
**Created:** [March 23, 2011, 7:26pm UTC](https://forum.kirupa.com/t/shared-library-referenceerror-error-1065/320445 "2011-03-23T19:26:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GustavoLima](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@GustavoLima](https://forum.kirupa.com/u/GustavoLima)\
**Post date:** [March 23, 2011, 7:26pm UTC](https://forum.kirupa.com/t/shared-library-referenceerror-error-1065/320445/1 "2011-03-23T19:26:35Z")

</div>

Hi everyone,

I’m using Flash CS5 (AS3) for my main application, and I need to load multiple swf files (childs) at different times. The swfs (childs) import assets from a separate flash swf used as a shared library. I’m using 1 swf loader to keep 1 swf loaded at a time.

Loading the first swf works fine, but loading subsequent swfs generates an error in importing from the shared library swf.

Here’s an example of an error:  
“ReferenceError: Error #1065: Variable myComponent is not defined.”

Thanks in advance for any advice!
