# Accessing external AS class file

**URL:** https://forum.kirupa.com/t/accessing-external-as-class-file/303715
**Category:** Uncategorized
**Created:** [January 25, 2010, 10:22pm UTC](https://forum.kirupa.com/t/accessing-external-as-class-file/303715 "2010-01-25T22:22:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![emstorm73](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@emstorm73](https://forum.kirupa.com/u/emstorm73)
#### Post date: [January 25, 2010, 10:22pm UTC](https://forum.kirupa.com/t/accessing-external-as-class-file/303715/1 "2010-01-25T22:22:05Z")

</div>

I have downloaded an AS 3 class file, designed to create an MD5 hash from a string. I have put the class file in my /components directory (with / being the root of my Flex project source).

When I attempt to compile, I get the following error:  
1120: Access of undefined property MD5.

The relevant snippets of code follow:

from the class file, named md5.as:

```auto
package components {    
    public class MD5 {
        ...
        public static function encrypt (string:String):String {
            return hex_md5 (string);
        }
    }
}

```

from the calling mxml file script section:

```auto

import components.MD5;
...
var pw:String = MD5.encrypt( password0_text.text );

```

Flex Builder 3 code assist DOES find components.MD5 when I start typing the import statement…

Any idea why this isn’t working? Others have gotten this to work without problem, so I know the md5.as file works. The ONLY modification I made to the md5.as file was to change the package statement to one that fits its actual location in my project.

Please help…  
Eric
