in releation to my last post about changing the color value of a selected movice clip with the transfom manager AS2
a button births a mc on2 the stage , when this mc is clicked the transfom manager is applyed
can anyone look at this code and tell me where i am going wrong
I cant seem to get the code to work to change the colour value of the last selected movie clip the tranform manager was applied to (var t) to
change from the default black to white when the button is clicked
stop();
import gs.TransformManager;
var NumInc:Number = 0;
var home:MovieClip = this;
var selectedClip:MovieClip
function buildIt(movieType:String) {
var t = home.attachMovie(movieType, "movie_mc"+NumInc, getNextHighestDepth(), {_x:232.8, _y:419.1});
var transformManager_obj = new TransformManager({forceSelectionToFront:false, allowDelete:true});
var transformManager_obj = new TransformManager({targetObjects:[t], bounds:{xMin:0, xMax:900, yMin:0, yMax:900}, forceSelectionToFront:true, eventHandler:onAnyEvent});
selectedClip = this["movie_mc"+NumInc]
++NumInc;
}
btn1_btn.onPress = function() {
buildIt("movietrib");
};
btn2_btn.onPress = function() {
buildIt("movietrib1");
};
color_btn.onPress = function() {
Color.prototype.setTint(255, 255, 255, 100)
//var colorful = new Color();
//colorful.setRGB(0xFFFFFF);
selectedClip.setTransform(colorful);
};
Color.prototype.setTint = function (r, g, b, amount) {
var percent = 100 - amount;
var trans = new Object();
trans.ra = trans.ga = trans.ba = percent;
var ratio = amount / 100;
trans.rb = r * ratio;
trans.gb = g * ratio;
trans.bb = b * ratio;
selectedClip.setTransform(trans);
}//
Can anyone help?
im really stumped