# \[CS3\] how to move a mc in a class

**URL:** <https://forum.kirupa.com/t/cs3-how-to-move-a-mc-in-a-class/270655>\
**Category:** flash\
**Created:** [September 12, 2008, 2:20am UTC](https://forum.kirupa.com/t/cs3-how-to-move-a-mc-in-a-class/270655 "2008-09-12T02:20:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [September 12, 2008, 2:20am UTC](https://forum.kirupa.com/t/cs3-how-to-move-a-mc-in-a-class/270655/1 "2008-09-12T02:20:32Z")

</div>

this seems so simple, yet I’m having issues with it. I’m starting out simple, all I’m having problems with is repositioning my mc with a function in the class, which is not the document class. here is some code:

```auto
package boxes{
	import flash.display.MovieClip;
	public class box0 extends MovieClip{
		
		import flash.display.DisplayObjectContainer;
		public var doc:DisplayObjectContainer;
		static var bs:MovieClip;
		public function box0(){
			bs = new box1(); //box1 is a movie clip
		}
		public function addBox(a:MovieClip){
			a.addChild(bs);
			
		}
			
		public function moveBox(){
		           bs.x = 100;
		}
	}
}

```

and here is the code on the timeline:

```auto
import boxes.box0;
var box:box0= new box0();
box.addBox(this);
box.moveBox();

```

the box is added to the stage, but is not positioned at 100 !?  
any help would be greatly appreciated!!😠
