开发者

How can I make a button change it's shape with every click (music button)

I want to design a mus开发者_JS百科ic button for a game like geochallenge


I wasn't able to see the geochallenge game , for some reason i get an empty facebook page , but for a button to change its shape you can create a function that will call the graphics property

var color:uint = 0x990000;

function clickHandler(event:MouseEvent):void
{
    buttonGraphics(event.target as MovieClip)
}

function buttonGraphics(mc:MovieClip ):void
{
    mc.graphics.clear; // clear the previous shape
    mc.graphics.beginFill(color );
    etc... //make the changes you need
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜