hello im using the Transform Manager as2
I created a program that can drag a movie clip multiple times and change the color of the selected movie clip
i apply this code on the frame
import gs.TransformManager;
var i:Number = 1000;
var manager_obj = new TransformManager({targetObjects:[test_mc, test_mc2, test_mc3, text_ti], bounds:{xMin:0, xMax:1300, yMin:0, yMax:700}, forceSelectionToFront:true, eventHandler:onAnyEvent});
manager_obj.addEventListener("move", onMove);
function onAnyEvent(event_obj:Object):Void {
trace("Action: "+event_obj.action+", MovieClip or TextField: "+event_obj.targetObject+", transformed?: "+event_obj.transformed);
}
function onMove(event_obj:Object):Void {
trace("Moved mc: "+event_obj.targetObject);
}
test_mc.onPress = function() {
i++;
test_mc.duplicateMovieClip("test_mc"+i, this.getNextHighestDepth());
_root["test_mc"+i].onPress = function() {
};
manager_obj.addItem(_root["test_mc"+i]);
};
test_mc2.onPress = function() {
i++;
test_mc2.duplicateMovieClip("test_mc2"+i, this.getNextHighestDepth());
_root["test_mc2"+i].onPress = function() {
};
manager_obj.addItem(_root["test_mc2"+i]);
};
then this is the code for the button to change the color of the selected movie clip
on (press) {
var colorful = new Color("_root.test_mc"+i, this.getNextHighestDepth());
colorful.setRGB(0x006699);
}
on (press) {
var colorful = new Color("_root.test_mc2"+i, this.getNextHighestDepth());
colorful.setRGB(0x006699);
}
i hope this may help you
now i work on how to change the color of the movie clip with an input text inside
when i color the mc i cannot put a text on it
i try to figure out how to color the movie clip and then put a text on it
is any one know????