# Actionscript file cannot access my public function of other AS file

**URL:** <https://forum.kirupa.com/t/actionscript-file-cannot-access-my-public-function-of-other-as-file/268476>\
**Category:** Uncategorized\
**Created:** [August 14, 2008, 10:05am UTC](https://forum.kirupa.com/t/actionscript-file-cannot-access-my-public-function-of-other-as-file/268476 "2008-08-14T10:05:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hizuka007](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@hizuka007](https://forum.kirupa.com/u/hizuka007)\
**Post date:** [August 14, 2008, 10:05am UTC](https://forum.kirupa.com/t/actionscript-file-cannot-access-my-public-function-of-other-as-file/268476/1 "2008-08-14T10:05:41Z")

</div>

Help!

How to I call my public funtion (from actionscript file 1) using other actionscript file…

here it is:  
-----------------------------as\_one class ---------  
package  
{  
import flash.disaply.MovieClip;

```
public class as_one extends MovieClip
{   
    import as_two;

     public function as_one()
     {
         as_two.initMe();     
     }

}

```

}  
-----------------------as two class ------  
package  
{  
import flash.disaply.MovieClip;

```
public class as_two extends MovieClip
{   
    

     public function as_two()
     {
         
     }

    public function initMe():void
   {
     .........
   }     

}

```

}

it only produce an error message stating: "Call to possibly undefined method initMe through a refference with static type class:  
as\_two.initMe();  
"

any idea?

thank you
