# Targeting MovieClips from a class

**URL:** <https://forum.kirupa.com/t/targeting-movieclips-from-a-class/305815>\
**Category:** flash\
**Created:** [March 4, 2010, 1:29am UTC](https://forum.kirupa.com/t/targeting-movieclips-from-a-class/305815 "2010-03-04T01:29:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fs\_tigre](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://forum.kirupa.com/u/fs_tigre)\
**Post date:** [March 4, 2010, 1:29am UTC](https://forum.kirupa.com/t/targeting-movieclips-from-a-class/305815/1 "2010-03-04T01:29:54Z")

</div>

Hi,

I’m a little confused as to how to target MovieClips from a class. If I have a MovieClip on the stage named recMc and I want to manipulate it using a class, I know that if I attach my class in the Document Class field in my .fla file and then just do something like this… it works

- class and fla are in the same folder -

```auto
package {

	import flash.display.*;
	import flash.events.*;

	public class Test extends MovieClip {

		public function Test():void {
			recMc.x=500;
			recMc.alpha = .5;
		}
	}
}

```

But, how can I do the same thing directly from a class without having to attach my class to the Document Class?

Would it be something like this…

```auto
package {

	import flash.display.*;
	import flash.events.*;

	public class Test extends MovieClip {

		public function Test():void {
			recMc.x=500;
			recMc.alpha = .5;
		}
	}
}

```

FLA file:

```auto
import Test;
var changeMe:Test = new Test();

```

Can someone show me how to target this object without attaching the class to the Document class?

Thanks
