# AS2:loading external Actionscript files

**URL:** <https://forum.kirupa.com/t/as2-loading-external-actionscript-files/300007>\
**Category:** flash\
**Created:** [November 14, 2009, 4:34am UTC](https://forum.kirupa.com/t/as2-loading-external-actionscript-files/300007 "2009-11-14T04:34:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![silverneo188](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@silverneo188](https://forum.kirupa.com/u/silverneo188)\
**Post date:** [November 14, 2009, 4:34am UTC](https://forum.kirupa.com/t/as2-loading-external-actionscript-files/300007/1 "2009-11-14T04:34:21Z")

</div>

Hi kirupa, I havent been on here in a while, and about the same time I have gone without programming.

Here is my delima  
I have a game and I need to load an .as into a section of my flash. this is the code I have. It’s on a “Checker” movie clip.

[AS]  
onClipEvent(enterFrame){  
\_global.eyes = \_root.eyesP.\_currentframe; //Global Eyes Setter  
\_global.mouth = \_root.mouthP.\_currentframe; //Global Mouth Setter  
#include “colorReader.as”;  
\_global.FBody = bodyColor;  
}  
[/AS]

I thought that [COLOR=lime]#include[/COLOR] is how you load .as into flash but when I test it i get this error and yes the .fla and .as are in the same folder

> 

**Error** Scene=Customizer, layer=Hidden Clips, frame=1:Line 5: Malformed #include directive  
#include “colorReader.as”;  
Total ActionScript Errors: 1 Reported Errors: 1

what is wrong I am confused on why this is not working
