so i have a really simple program that simply draws a rectangle, and lets the user move the rectangle around the scene with the mouse. except its not working, no errors.
the problem is, when i click and drag around the scene - nothing happens.
var container_mc:MovieClip;
var width:Number = 100;
var height:Number = 60;
container_mc = this.createEmptyMovieClip( "boxContainer", this.getNextHighestDepth() );
container_mc.clear(); // Clear the previous box rendering.
container_mc.lineStyle( 1, 0x000000, 100 ); // Use a 1 point black line.
container_mc.beginFill( 0x0FFFFF, 100 ); // Start a white fill.
container_mc.moveTo(0, 0); // Position the drawing pen.
container_mc.lineTo( width, 0 ); // Draw the border of the box.
container_mc.lineTo( width, height );
container_mc.lineTo( 0, height );
container_mc.lineTo( 0, 0 );
container_mc.endFill(); // Formally stop filling the shape.
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
this.orig_x = _xmouse; // store position of rectangle
this.orig_y = _ymouse;
};
mouseListener.onMouseMove = function() {
this.container_mc.moveTo(this.orig_x, this.orig_y);
updateAfterEvent();
};
mouseListener.onMouseUp = function() {
this.orig_x = _xmouse; // store position of rectangle
this.orig_y = _ymouse;
};
Mouse.addListener(mouseListener);