But we're better off placing that code in a function and
calling the function from the button:
// CODE ON FRAME 1 OF THE BUTTON'S TIMELINE
function transformClip(clip, scale, transparency, framelabel) {
clip._xscale = scale;
clip._yscale = scale;
clip._alpha = transparency;
clip.gotoAndPlay(framelabel);
}
// CODE ON BUTTON
on (release) {
transformClip(title, 20, 50, "fadeout");
}
This approach keeps all of our code centralized and easy to maintain
and allows us to quickly apply the button's behavior to many
buttons with minimal effort.