# Accessing MC class from document class

**URL:** <https://forum.kirupa.com/t/accessing-mc-class-from-document-class/309820>\
**Category:** Uncategorized\
**Created:** [May 25, 2010, 3:00pm UTC](https://forum.kirupa.com/t/accessing-mc-class-from-document-class/309820 "2010-05-25T15:00:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rez1n](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rez1n](https://forum.kirupa.com/u/rez1n)\
**Post date:** [May 25, 2010, 3:00pm UTC](https://forum.kirupa.com/t/accessing-mc-class-from-document-class/309820/1 "2010-05-25T15:00:56Z")

</div>

Hey Guys,

I have created a movieclip in the library and added a class to it. I want to access a function and set an Array in that class from the document class…

Heres what im doing now which is not working… it says startnow function is undefined.

```php

package com {
 
 import flash.display.*;
 import flash.events.*;
 import com.NavMC
 
 public class Capability extends MovieClip {
  // Constants:
  // Public Properties:
  public var navMC:NavMC
  public var listMovies:Array = new Array("page1.swf","page1.swf","page1.swf")
  // Private Properties:
  // UI Elements:
 
  // Initialization:
  public function Capability() {
   navMC:NavMC= new NavMC()
   navMC.setArray = listMovies
   navMC.StartNow()
  } 
 }
}

```

Here is the class for the movieclip in the Library, the movieclip is already on the stage.

```php

package com {
 
 import flash.display.*;
 import flash.events.*;
 
 public class NavMC extends MovieClip {
  // Constants:
  // Public Properties:
  public var listMovies:Array = new Array();
  // Private Properties:
  // UI Elements:
 
  // Initialization:
  public function NavMC() {
  }
  public function set setArray(_listMovies:Array) {
   listMovies = _listMovies;
   trace ("setArray"+listMovies); // Does not trace
  }
  public function set StartNow() {
   //Start the code. // This does not work.
  }
 }
 
}

```

Im just a bit confused :puzzled:
