# How to add a movie clip to the display from a class?

**URL:** <https://forum.kirupa.com/t/how-to-add-a-movie-clip-to-the-display-from-a-class/329989>\
**Category:** flash\
**Created:** [November 14, 2012, 1:05pm UTC](https://forum.kirupa.com/t/how-to-add-a-movie-clip-to-the-display-from-a-class/329989 "2012-11-14T13:05:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FJW](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@FJW](https://forum.kirupa.com/u/FJW)\
**Post date:** [November 14, 2012, 1:05pm UTC](https://forum.kirupa.com/t/how-to-add-a-movie-clip-to-the-display-from-a-class/329989/1 "2012-11-14T13:05:34Z")

</div>

Hi once again. I have a MainDoc class from where I can add movieclip without a problem. Is it possible though to add a movieclip from a different class i.e Backgrd. I have this Backgrd class and am trying to put a movieclip on the stage from it. package  
{  
import flash.display.MovieClip;  
import flash.display.Stage;

public class Backgrd extends MovieClip  
{  
private var thebackgrd:Backgrd;  
private var JanBKGD:Backgrd;

private var container:MovieClip;  
private var mainStage:Stage;

public function Backgrd(container:MovieClip) : void  
{  
thebackgrd = new Backgrd(container);  
this.container = container;  
this.mainStage = container.stage;  
this.addChild(thebackgrd);  
//anotherMethod();  
}

```
 public function anotherMethod():void
  {
  thebackgrd = new Backgrd(container)
  container.addChild(thebackgrd);
  //or call
  //mainStage.addChild(thebackgrd);
  }

```

}  
}
