hello. need some help ASAP.
what i’m trying to do is get a movie to duplicate movieclips when the original movieclip is dropped onto a target.
what it does is,
- click, drag movie clip to target.
- drop, released.
- duplicate movieclip appears in the ORIGINAL position from where the original movieclip was picked up.
- and keep the dropped movieclip in place.
i don’t know why i get,
TypeError: Error #1007: Instantiation attempted on a non-constructor. at Untitled_fla::MainTimeline/dirt_UP()
function dirt_UP(e:MouseEvent):void{
if (e.target.dropTarget != null && e.target.dropTarget.parent == this.shirt){ e.target.stopDrag();
startX = e.target.x;
startY = e.target.y;
var dirt_rock:MovieClip = new e.target.duplicateMovieClip();
addChild(dirt_rock);
dirt_rock.x = startX;
dirt_rock.y = startY;
}