I had some help in setting up this bit of code to fade out a loaded movie:
function faderFunc() {
_root.holder24._alpha -= 5;
if (_root.holder24._alpha < 0) {
_root.holder24._alpha = 0;
clearInterval(fadeRMS);
}
};
fadeRMS = setInterval(faderFunc, 400);
Trouble is, I am looking to fade the clip slowly to zero once it has been a certain number of seconds, rather than just having the clip fade at a rate of -5 every so many seconds as it is set here.
In comparing this to other code that I have been using setInterval in, I am wondering if the problem is that this setInterval is not control an onEnterFrame event, but rather just control the rate of the alpha fade. I don’t see how I could use an on enterFrame with this because the swf has already been loaded into a movie in this same Frame…maybe I am wrong about both of these thoughts, maybe just one.
I would really appreciate some insight on this I have been working with different attempts for a while and cannot get the results I want.
(Here is an example of some other code I am using that does delay the onEnterFrame event, I think, so that the code is not being fully executed until 57 seconds pass…)
function moveRMS() {
clearInterval(moveRMSInterval);
unloadMovie(_root.holder22);
xstep=(30-holder24._x)/5
ystep =(500-holder24._y)/5
_root.holder24.onEnterFrame = function() {
this._y -= (577-this._y)/ystep;
this._x -= (865-this._x)/xstep;
if (Math.abs(577-this._y)<1 && Math.abs(865-this._x)<1) {
this._y = 577;
this._x = 865;
delete this.onEnterFrame;
}
};
}
moveRMSinterval = setInterval(moveRMS, 57000);