Hi,
I’m not that good at actionscript and i’m playing with some code from scotty but i dont get and if i dont get it i cant do things i want, i’m pulling myhair out.
Search the internet for tutorials or tips on how to deal with it and how to make my idead work.
I just want it to load another JPG when the button is clicked…
Why doesn’t the effect work when i just add loadMovie.
Why Why and i cant figure out a way to reverse it. First it fades in when clicked it fades out and then fades in the freshly loaded jpg.
Please Help me…or teach me
Thanks in advance
THE code
var cColor;
MovieClip.prototype.fadeColor = function(cto, ease) {
var d = 0;
var myColor = new Color(this);
// myColor.setTransform({ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0});
this.onEnterFrame = function() {
for (var c in cColor) {
cColor[c] += (cto[c]-cColor[c])/ease;
}
myColor.setTransform(cColor);
d++;
if (d>20) {
cto = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
ease = 10;
}
};
};
btn1.onRelease = function() {
pic.fadeColor({ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0}, 5);
cColor = myColor.getTransform();
};
var myColor = new Color(pic);
cColor = myColor.getTransform();