傳統的Flash Button 有四種States:
up, down, over, hit
這四種States正式的屬性名稱為
upState, downState, overState, hitTestState
其中比較不一樣的就是 "hit"(hitTestState),
它決定了該按鈕(Button) 接受觸發的範圍
[code snippet] btn1 is a given button ...
var imgGray1:MovieClip = new imgGray();
var greenCircleShape:Shape = new Shape();
greenCircleShape.graphics.beginFill(0x00ff00);
greenCircleShape.graphics.drawCircle(0, 0, 20);
btn1.upState= imgGray1;
btn1.overState= imgGray1;
btn1.downState= imgGray1;
btn1.hitTestState= greenCircleShape;
沒有留言:
張貼留言