Saturday, June 30, 2012

[Action Script] Optional parameters June,2012

Hey guys, I've got the following code
Code: function menuFade(button1:TextField, button2:TextField) {
                if(fadeIn) {
                        button1.alpha = 1;
                        button2.alpha = 1;
                }
                if(!fadeIn) {
                        button1.alpha = 0.2;
                        button2.alpha = 0.2;
                }
}But I want button2 to be optional, and I can't get that to work. Can someone help me on this?
Optional parameters

Related Post



0 comments: