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