Here is the code that I have right now (it obviousvly doesn’t do what I want it to):
#include "lmc_tween.as"
orig_x = mc_01.black_bkg._x;
orig_y = mc_01.black_bkg._y;
function buttonIn() {
mc_01.btn_txt.alphaTo(100, 1.25, "easeOutBounce");
mc_01.black_bkg.tween(["_xscale","_yscale"],[100,150], 1.25, "easeOutBounce");
mc_01.black_bkg.slideTo(orig_x, orig_y-5, 1.25, "easeOutBounce");
}
function buttonOut() {
mc_01.btn_txt.alphaTo(0, 1.25, "easeOutBounce");
mc_01.black_bkg.scaleTo(100, 1.25, "easeOutBounce");
mc_01.black_bkg.slideTo(orig, orig_y, 1.25, "easeOutBounce");
}
mc_01.btn.onRollOver = buttonIn;
mc_01.btn.onRollOut = buttonOut;
mc_02.btn.onRollOver = buttonIn;
mc_02.btn.onRollOut = buttonOut;
mc_03.btn.onRollOver = buttonIn;
mc_03.btn.onRollOut = buttonOut;
What I want to be able to do is pass the name of the movie clip (ie mc_01, mc_02…) to the function, and have the function effect that particular movie clip. I had this code that didn’t work:
#include "lmc_tween.as"
orig_x = mc_01.black_bkg._x;
orig_y = mc_01.black_bkg._y;
function buttonIn(clipName) {
clipName.btn_txt.alphaTo(100, 1.25, "easeOutBounce");
clipName.black_bkg.tween(["_xscale","_yscale"],[100,150], 1.25, "easeOutBounce");
clipName.black_bkg.slideTo(orig_x, orig_y-5, 1.25, "easeOutBounce");
}
function buttonOut(clipName) {
clipName.btn_txt.alphaTo(0, 1.25, "easeOutBounce");
clipName.black_bkg.scaleTo(100, 1.25, "easeOutBounce");
clipName.black_bkg.slideTo(orig, orig_y, 1.25, "easeOutBounce");
}
mc_01.btn.onRollOver = buttonIn("mc_01");
mc_01.btn.onRollOut = buttonOut("mc_01");
mc_02.btn.onRollOver = buttonIn("mc_02");
mc_02.btn.onRollOut = buttonOut("mc_02");
mc_03.btn.onRollOver = buttonIn("mc_03");
mc_03.btn.onRollOut = buttonOut("mc_03");
Thank you in advance,
Milo