import fl.motion.Color;
var square:Sprite = new Sprite();
square.graphics.beginFill(0x000000);
square.graphics.drawRect(100, 100, 100, 100);
addChild(square);
square.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
square.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
function onMouseOver (e:MouseEvent):void
{
var c:Color = new Color();
c.setTint (0x929218, 1);
square.transform.colorTransform = c;
}
function onMouseOut (e:MouseEvent):void
{
var c:Color = new Color();
c.setTint (0, 0);
square.transform.colorTransform = c;
}
CodeLink
http://codes.creativebrain.ca
Long time no chat
-
Woah; I haven't visited FlashKit in over 20 years but I though of it
recently and apparently I still have access to my account after 24 years.
It's so cool...
1 week ago
0 comments:
Post a Comment