# Include code from an external .as file - error?

**URL:** <https://forum.kirupa.com/t/include-code-from-an-external-as-file-error/50993>\
**Category:** Uncategorized\
**Created:** [May 8, 2004, 2:10pm UTC](https://forum.kirupa.com/t/include-code-from-an-external-as-file-error/50993 "2004-05-08T14:10:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jantom](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jantom](https://forum.kirupa.com/u/jantom)\
**Post date:** [May 8, 2004, 2:10pm UTC](https://forum.kirupa.com/t/include-code-from-an-external-as-file-error/50993/1 "2004-05-08T14:10:52Z")

</div>

When I try to include code from the external file “test.as” I get an error:

“ActionScript 2.0 class scripts may only define class or interface constructs.”

“test.as” contains a simple function:

* * *

## function test () { trace(“test”); }

I put:

#include “test.as”

in my .fla.

I thought I could edit code in an external editor. Could somebody enlighten me if that’s possible?
