仿苹果电脑的导航菜单


06年学类时,写的菜单效果。模仿苹果机中的菜单效果,鼠标经过图标时,以该图标为中心向两边缩放。/**%20%C2%A0*MacintoshMenu(%E4%BB%BF%E8%8B%B9%E6%9E%9C%E6%9C%BA%E8%8F%9C%E5%8D%95)%20%C2%A0*Auther:%E6%B5%81%E6%B5%AA%E5%84%BF%20%C2%A0*Versoin:MacintoshMenu%C2%A01.0%20**/%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

你可能感兴趣的:(html)