controling individual mc after we duplicate
Hi all! I have a question...let's say we duplicate dynamicaly an MC four times, and place the duplicants on stage dymamicaly like this:
ball0._visible = 0;
for (i=1; i<=4; i++) {
duplicateMovieClip(ball0, "ball"+i, i+20);
_root["ball"+i]._x = 125;
_root["ball"+i]._y = 360;
_root["ball"+i]._xscale = 80;
_root["ball"+i]._yscale = 80;
}
Then how do we control individual MC's x and y position after a drag and drop?
thanks....
How to control after duplicating mc's
Hello, well I hopefully will answer your question in the best possible manner. After you duplicate an item you must understand that you have to literally direct all actionscript dynamically on a frame instead of actually selecting on the MC or Button via the timeline.
For that reason we would go about the actionscript like this:
_root.ball1.onPress = function () {
this.startDrag();
//whatever other statements
}
_root.ball1.onRelease = function () {
this.stopDrag();
//whatever other statements
}
You can then place these actionscripts everywhere that would reference whatever paths help you.