06年学类时,写的菜单效果。模仿苹果机中的菜单效果,鼠标经过图标时,以该图标为中心向两边缩放。%20class%C2%A0MacintoshMenu%C2%A0%7B%20%C2%A0//%E5%B1%9E%E6%80%A7%20%C2%A0private%C2%A0var%C2%A0target:MovieClip;%20%C2%A0private%C2%A0var%C2%A0imageContainer:MovieClip;%20%C2%A0private%C2%A0var%C2%A0imageArr:Array;%20%C2%A0private%C2%A0var%C2%A0total:Number;%20%C2%A0private%C2%A0var%C2%A0spanX:Number%C2%A0=%C2%A05;%20%C2%A0private%C2%A0var%C2%A0ypos:Number%C2%A0=%C2%A0Stage.height/2+50;%20%C2%A0//%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0%20%C2%A0public%C2%A0function%C2%A0MacintoshMenu(target:MovieClip,%C2%A0imageArr:Array,%C2%A0scale:Number)%C2%A0%7B%20%C2%A0%C2%A0this.target%C2%A0=%C2%A0target;%20%C2%A0%C2%A0this.imageArr%C2%A0=%C2%A0imageArr;%20%C2%A0%C2%A0//%20%C2%A0%C2%A0total%C2%A0=%C2%A0imageArr.length;%20%C2%A0%C2%A0imageContainer%C2%A0=%C2%A0target.createEmptyMovieClip("> attachMc(scale);
resetPosition();
}
//加载图片
private function attachMc(scale:Number):Void {
for (var i:Number = 0; i>> "+mouseX);trace("");
if (owner.imageContainer.hitTest(owner.target._xmouse, owner.target._ymouse)) {
if (mouseX
本文转自:http://www.5uflash.com/flashjiaocheng/Flashdonghuajiaocheng/2037.html