# Accessing a Movie Clip on the stage from a class

**URL:** <https://forum.kirupa.com/t/accessing-a-movie-clip-on-the-stage-from-a-class/282273>\
**Category:** flash\
**Created:** [February 19, 2009, 5:52pm UTC](https://forum.kirupa.com/t/accessing-a-movie-clip-on-the-stage-from-a-class/282273 "2009-02-19T17:52:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrbelv](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mrbelv](https://forum.kirupa.com/u/mrbelv)\
**Post date:** [February 19, 2009, 5:52pm UTC](https://forum.kirupa.com/t/accessing-a-movie-clip-on-the-stage-from-a-class/282273/1 "2009-02-19T17:52:06Z")

</div>

I have a Flash file with Movice Clips that are placed on the stage at author time. Let’s say one of the clips is called “stageClipMC”.

Say I have a main class file with the following code:

```auto
 
package 
{
 import flash.display.MovieClip;
 import flash.events.*;
 import src.MainNav;
 public class main extends MovieClip
 { 
  
  public function main() 
  {
   var mainNav:MainNav = new MainNav();
  }
 }
}

```

Now… from this class, I can directly access “stageClipMC” just fine.

The code for the MainNav class is:

```auto
 
package src 
{
 import flash.display.MovieClip;
 public class MainNav extends MovieClip
 {
  public function MainNav():void {
   trace("stageClipMC: " + stageClipMC);
  }   
 }
}

```

Tracing “stageClipMC” return “undefined”. From this class, how would I access the clip on the stage? I have tried different variations on “MovieClip(root)” and “MovieClip(stage)” to no avail.

Thanks for your help!
