I didn’t know, but it seems that you can reference your user-config folder with the $(UserConfig) variable, when setting class paths in Flash CS4.
You can create an mxi file that distributes a swc file and a jsfl command that adds “$(UserConfig)/Libraries” to the library path of the current working document.
The mxi extension source file:
<macromedia-extension name="Electric Library" version="0.1.0" type="flashcomponentswc" requires-restart = "false" >
<author name="Me" />
<products>
<product name="Flash" version="8" primary="true" required="true"/>
</products>
<description>
<![CDATA[My Library]]>
</description>
<ui-access>
<![CDATA[n/a]]>
</ui-access>
<license-agreement>
<![CDATA[My License agreement]]>
</license-agreement>
<files>
<file source = "MyLibrary.swc" destination = "$flash/Libraries" shared="true"/>
<file source = "bin/Add path to My Library.jsfl" destination = "$flash/Commands" shared="true"/>
</files>
</macromedia-extension>
The “Add path to My Library.jsfl” command file:
var myDoc = fl.getDocumentDOM();
myDoc.libraryPath = "$(UserConfig)/Libraries;" + myDoc.libraryPath;
fl.trace("class path: "+myDoc.libraryPath);
Use the Extension Manager to package the mxi file. This will create a mxp file that you can distribute.