# Path Problem

**URL:** <https://forum.kirupa.com/t/path-problem/17626>\
**Category:** flash\
**Created:** [April 7, 2003, 6:24pm UTC](https://forum.kirupa.com/t/path-problem/17626 "2003-04-07T18:24:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nigeledge](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@nigeledge](https://forum.kirupa.com/u/nigeledge)\
**Post date:** [April 7, 2003, 6:24pm UTC](https://forum.kirupa.com/t/path-problem/17626/1 "2003-04-07T18:24:20Z")

</div>

I’ve created a simple class… in the class I have a function which creates a button clip…

```auto
_global.TestClass= function()
{	
   this.createButton = function()
   {
        
        _root.createEmptyMovieClip("button",300);
        _root.button.lineStyle(0,0x000000,100);
        _root.button.beginFill(0xE6E6DC,100);
        _root.button.moveTo(20,35);
        _root.button.lineTo(20,55);
        _root.button.lineTo(100,55);
        _root.button.lineTo(100,35);
        _root.button.lineTo(20,35);
        _root.button.endFill();
        
        _root.button.onRelease = function()
        {
                // here's the problem.
               PATH-TO-METHOD?.buttonClicked();
        }
        
   };

   this.buttonClicked = function()
   {
       trace("Button Clicked");
   };

}

```

In the onRelease handler I call the buttonClicked function within the class… however… I can’t get it to work. Basically, I don’t know how to path reference it. If I say this.buttonClicked() then it is referring to the clip itself instead of the class. Any suggestions? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 10:04pm UTC](https://forum.kirupa.com/t/path-problem/17626/2 "2003-04-07T22:04:57Z")

</div>

1/ i would take

```php
                _root.button.onRelease = function()
                {
                        // here's the problem.
                        PATH-TO-METHOD?.buttonClicked();
                }

```

out of the “createBtn”…and even out of “TestClass”…  
2/then try

```php
                _root.button.onRelease = function()
                {
                        // here's the problem.
                        TestClass.buttonClicked();
                }

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 10:34pm UTC](https://forum.kirupa.com/t/path-problem/17626/3 "2003-04-07T22:34:57Z")

</div>

Judging by your workaround… I’m guessing that it is not possible to call other class methods from another method within the same class. Is this true? Makes flash a bit limited doesn’t it?
