# Access buttons/movie clips from extending class?

**URL:** <https://forum.kirupa.com/t/access-buttons-movie-clips-from-extending-class/320436>\
**Category:** Uncategorized\
**Created:** [March 23, 2011, 12:28pm UTC](https://forum.kirupa.com/t/access-buttons-movie-clips-from-extending-class/320436 "2011-03-23T12:28:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tucker148](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@tucker148](https://forum.kirupa.com/u/tucker148)\
**Post date:** [March 23, 2011, 12:28pm UTC](https://forum.kirupa.com/t/access-buttons-movie-clips-from-extending-class/320436/1 "2011-03-23T12:28:11Z")

</div>

I have a flash project (.fla file) that includes an external actionscript package. Inside the package I am trying to reference buttons and movie clips that are in the main timeline, but it keeps throwing reference errors. Here is what the package looks like:

```auto
package {
    import flash.display.*;
    import flash.utils.*;
    import flash.events.*;

    public class dfyEditor extends Sprite {         
        function dfyEditor() {}
        
        function setupActions() {
            btnSave.addEventListener('click', function(){
                btnSaveClip.gotoAndStop(3)
            });
        }
    }
}

```

Inside the main flash file, I have this code to instantiate it:

```auto
var dfy:dfyEditor = new dfyEditor();
dfyEditor.setupToolbar();

```

What is the right way to reference those items from within the class? Thank you!!
