# Accessing Elements on the Stage from a linked Class

**URL:** <https://forum.kirupa.com/t/accessing-elements-on-the-stage-from-a-linked-class/245331>\
**Category:** flash\
**Created:** [November 28, 2007, 5:08pm UTC](https://forum.kirupa.com/t/accessing-elements-on-the-stage-from-a-linked-class/245331 "2007-11-28T17:08:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveistheword](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@daveistheword](https://forum.kirupa.com/u/daveistheword)\
**Post date:** [November 28, 2007, 5:08pm UTC](https://forum.kirupa.com/t/accessing-elements-on-the-stage-from-a-linked-class/245331/1 "2007-11-28T17:08:39Z")

</div>

I’m trying to link a clip to a class, and it goes well until I try to access MovieClips or TextFields placed on the stage within that clip from code in the class. My code is below; there is a TextField called output\_txt on the stage within this clip.

Any help is much appreciated.  
Dave

class Main extends MovieClip{  
public function Main() {  
//trace(“123”); \<–if I replace the line below with this, it traces nicely  
output\_txt.text = “123”;  
stop();  
}  
}
