I have a movie where a textbox clip is attached to an empty mc. This textbox mc can be dragged and resized. All of this works fine. I would like to add as many of these textbox mc to the stage as I want but the problem is when I add the second textbox mc the resize starts working on the new textbox and stops on the one before it. I know it is something I am overlooking and it is probably staring me in the face but I cant see whats wrong. Can someone please take a look and give me a helping hand? Fla attached.
nope, movieclip instance name is different everytime. I have attached the fla for review. The linkage name is the same but the instance name is "Text" plus a counter number.
when you create the function AddTextObject, each time an instance is added, you need to include it in an array. Then apply the functions to the array, so that the functions affect all instances on the stage.
var newTexts:Array = new Array();
function AddTextObject() {
addTextBtn.onPress = function {
var T = _root.Pane.attachMovie("TextBox", "Text"+iCount, iCount); newTexts.push(T);
trace(newTexts);
for (var i:Number = 0;i<(insert a value);i++) {
//put your dragging functions here, referring to the array.
newTexts.onPress = function() {
this.startDrag(false);
}
}
}
}
HTH