2009. február 17., kedd

Actionscript 3.0 - Eventlistener 2

button1_btn.addEventListener(MouseEvent.MOUSE_OVER, buttonGrow);
button1_btn.addEventListener(MouseEvent.MOUSE_OUT, buttonShrink);
button2_btn.addEventListener(MouseEvent.MOUSE_OVER, buttonGrow);
button2_btn.addEventListener(MouseEvent.MOUSE_OUT, buttonShrink);

function buttonGrow(event:MouseEvent):void
{
event.target.scaleX = event.target.scaleY = 1.1;
}

function buttonShrink(event:MouseEvent):void
{
event.target.scaleX = event.target.scaleY = 1;
}

Nincsenek megjegyzések: