# Importing and including class and functions

**URL:** <https://forum.kirupa.com/t/importing-and-including-class-and-functions/292264>\
**Category:** Uncategorized\
**Created:** [July 12, 2009, 12:18pm UTC](https://forum.kirupa.com/t/importing-and-including-class-and-functions/292264 "2009-07-12T12:18:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalyman](https://avatars.discourse-cdn.com/v4/letter/k/d26b3c/32.png) [@kalyman](https://forum.kirupa.com/u/kalyman)\
**Post date:** [July 12, 2009, 12:18pm UTC](https://forum.kirupa.com/t/importing-and-including-class-and-functions/292264/1 "2009-07-12T12:18:52Z")

</div>

Hey guys, am new to flash and am trying to create simple program, I kinda know how to code the program but its really difficult to interpret everything into action script.

For example I created class file in file node.as

```auto

class node {
    var x:Number;
    var y:Number;
    var parx:Number;
    var pary:Number;
    var G:Number;
    var H:Number;
    var F:Number;

    //---------------------------------------------------------
     function node() {
        this.x=0;
        this.y=0;
        this.parx=0;
        this.pary=0;
        this.G=0;
        this.H=0;
        this.F=0;
    }
}
 

```

and few other functions that i want to use in main function in findpath.as file

now every time i try to import class or include functions in main .fla file \>\>\>

```auto
import node;
include "findPath.as";

```

its giving me errors \>

5007: An ActionScript file must have at least one externally visible definition.

So the question is how do I import class and functions so I dont need to write everything into one .fla file?  
Thanks for any help.

ill attach incomplete code to this post.

~Kal
