# Addressing class variables which are movies

**URL:** <https://forum.kirupa.com/t/addressing-class-variables-which-are-movies/199365>\
**Category:** flash\
**Created:** [September 1, 2006, 5:56pm UTC](https://forum.kirupa.com/t/addressing-class-variables-which-are-movies/199365 "2006-09-01T17:56:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marky\_boy](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@marky\_boy](https://forum.kirupa.com/u/marky_boy)\
**Post date:** [September 1, 2006, 5:56pm UTC](https://forum.kirupa.com/t/addressing-class-variables-which-are-movies/199365/1 "2006-09-01T17:56:01Z")

</div>

Hello, I’m having a bit of a problem with this.

I have a class- MiniMap which extends the MovieClip class.

This class has a variable which is itself a movieClip, this movieClip is a small window which can be moved around on the map to select which portion of the miniMap will be shown in the bigger map.

How do I refer back a events on the class variables to effect the host class?

Here’s some code:

```auto
dynamic class MiniMap extends MovieClip {
	
	var myWindow:WorldWindow;  
	var myZoomIn:MovieClip;
	var myZoomOut:MovieClip;
	
	function MiniMap() {
		
		this.attachMovie("WorldWindow", "myW", this.getNextHighestDepth());
	
		myWindow = myW;
			}

```

That’s the opening of the MiniMap

Now for the world window class:

```auto
dynamic class WorldWindow extends MovieClip {

	function WorldWindow() {
		
		this._x = 10;
		this._y = 10;
		this._width = 80;
		this._height = 50;
		
		}
		
	public function onPress(){
		this.startDrag(false,0,0,200 - this._width, 126 - this._height);
		trace("doing something");
//THIS DOES NOTHING...
			}
		
	function onRelease(){
		this.stopDrag();
			}
	
}

```

Any hints would be very gratefully received.

Thanks  
M
