;

PDA

Click to See Complete Forum and Search --> : button targeting seems so obvious, but not working


SwirlyKing
09-27-2008, 08:38 PM
I'm thinking this should be so simple, but I can't get the scaleX to work.fishName.infoBtn.addEventListener(MouseEvent. CLICK, fishClick);
function fishClick(e:MouseEvent):void{
btnClick = btnClickSound.play();
fishName.infoBtn.scaleX = .1;
}

fx.barrett
09-27-2008, 10:39 PM
// disable the children of "infoBtn" so they won't react to the click event
fishName.infoBtn.mouseChildren = false;
fishName.infoBtn.addEventListener(MouseEvent.CLICK , fishClick);

function fishClick(e:MouseEvent):void
{
btnClick = btnClickSound.play();
e.target.scaleX = .1;
}