This is a simple script loading a swf to the stage, but I am having trouble getting the movieClip to drag. It’s probably something simple, but I can’t see it. Can someone point me in the right direction?
test_btn.onRelease = function() {
piece = "bed";
createEmptyMovieClip("item_mc", this.getNextHighestDepth());
item_mc.createEmptyMovieClip("container_mc", 0);
item_mc.container_mc.loadMovie("decals/"+piece+".swf");
item_mc.container_mc._x = 200;
item_mc.container_mc._y = 100;
};
item_mc.onPress = function() {
this.startDrag();
trace("test");
};
//
item_mc.onRelease = function() {
stopDrag();
};