# Debug help?

**URL:** https://forum.kirupa.com/t/debug-help/295654
**Category:** Uncategorized
**Created:** [September 2, 2009, 1:37pm UTC](https://forum.kirupa.com/t/debug-help/295654 "2009-09-02T13:37:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![benswift](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@benswift](https://forum.kirupa.com/u/benswift)
#### Post date: [September 2, 2009, 1:37pm UTC](https://forum.kirupa.com/t/debug-help/295654/1 "2009-09-02T13:37:56Z")

</div>

running into an issue where I am not able to call a function from a separate class… I am spinning my gears trying multiple things. Both the class files are working fine alone, but won’t work together.

let’s say there is a MC called clickme\_btn

for example, here’s the function I want to trigger:

```auto

package{

     import flash.events.*;

     public class Example extends MovieClip{
 
          public function Example() {
         
                init();
 
            }

           private function init():void {

			//dosomething();

		}

          public function buttonClicked(e:MouseEvent) {

               trace("what up Kirupa fans?");
          }

     }

}

```

here’s the place I want to trigger it from:

```auto

package{

     import flash.events.*;

     public class triggerExample extends MovieClip{

          public function triggerExample () {
			init();
		}

          private function init():void {

			setUpListeners();

		}

           private function setUpListeners():void {

                        clickme_btn.addEventListener(MouseEvent.CLICK, buttonClicked);

                }

          

     }

}

```

any help would be great. Thanks!
