# How to target an .as file from another .as

**URL:** <https://forum.kirupa.com/t/how-to-target-an-as-file-from-another-as/232216>\
**Category:** flash\
**Created:** [July 11, 2007, 10:51pm UTC](https://forum.kirupa.com/t/how-to-target-an-as-file-from-another-as/232216 "2007-07-11T22:51:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arcadiabc](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@arcadiabc](https://forum.kirupa.com/u/arcadiabc)\
**Post date:** [July 11, 2007, 10:51pm UTC](https://forum.kirupa.com/t/how-to-target-an-as-file-from-another-as/232216/1 "2007-07-11T22:51:31Z")

</div>

Hello,

I was wondering If some one can help in teaching me how to target a function in one .as file from another .as file.

For example.

Lets say that in as1.as I have a function:

```auto

//---------as1.as
Function hello():Void {
  Trace(“hello”);
  }

```

And in as2.as I have function with in a button;

```auto

//---------as2.as
Button1.onRelease = function():Void {
  Hello();
  }

```

Hope it makes sense.

Thank you.
