I made the following function to fade in and out four clips:
function fadeSq (clips, fade, speed){
while (clips.length){
clips[0].onEnterFrame = function(){
var fadeOut = fade - this._alpha;
this._alpha += fadeOut /speed;
};
clips.splice(0, 1);
}
}
and I’m calling the code this way:
this.fadeSq ([btn_about_us, btn_Products, btn_product_codes, btn_contact_us], 0, 3);
As you al can see am I using underscores in the call back function, which I don’t want because I want to display the information in a dynamic textfield. But when I leave open spaces I get all kind of errors. How can I prevend this?