# Modularizing into multiple .swf files and still sharing variables and functions

**URL:** <https://forum.kirupa.com/t/modularizing-into-multiple-swf-files-and-still-sharing-variables-and-functions/236975>\
**Category:** Uncategorized\
**Created:** [August 25, 2007, 8:24pm UTC](https://forum.kirupa.com/t/modularizing-into-multiple-swf-files-and-still-sharing-variables-and-functions/236975 "2007-08-25T20:24:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coolburn](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@coolburn](https://forum.kirupa.com/u/coolburn)\
**Post date:** [August 25, 2007, 8:24pm UTC](https://forum.kirupa.com/t/modularizing-into-multiple-swf-files-and-still-sharing-variables-and-functions/236975/1 "2007-08-25T20:24:19Z")

</div>

Hello,

I’ve been pulling my hair out trying to figure this out.

I would like to modularize into three .swf files.

1. boot.swf - this one will take the other two, put them together, and let them share functions and variables
2. api.swf - this would be a set of functions and variables that are used by the third flash file
3. main.swf - this is the main functionality, but it needs to make use of some of the functions and variables in api.swf

The reason I want boot.swf to load them, is so that I can mix and match api’s with the main program code being plugged in. But, boot.swf will be the standard file that I start with.

I have gotten as far as getting boot.swf to load main.swf using Loader. However, I can’t seem to get main.swf to access anything in boot.swf… let alone access anything in api.swf.

Any assistance is much appreciated!

Thank you!
