i need to some how make the function.call(param) the name of the button you press to call it.
that is to say if you press bh01 then the call would be vistoggle(bh01)
any thought or ideas would be greatly appreciated
import flash.display.*;
import flash.events.*;
import flash.ui.Keyboard;
function clickbh01(event:MouseEvent) {
vistoggle(player.h01);
trace(this);
}
player.h01.alpha = .0;
player.h02.alpha = .0;
player.n01.alpha = .0;
player.gotoAndStop(1);
bh01.addEventListener(MouseEvent.MOUSE_DOWN, clickbh01);
function vistoggle(item:Object) {
if (item.alpha == .0) {
item.alpha = 1;
} else {
if (item.alpha == 1) {
item.alpha = 0;
}
}
}
any ideas:panda: