Targeting MovieClips from a class

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 -
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…

package {

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

	public class Test extends MovieClip {

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

FLA file:

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