플래시로 만드면 수정이 어렵죠......ㅠ
현제 만들고 있는 메뉴 입니다.
xml로 수정 쉽게 가능합니다 메모장으로 추가 시키면 ㅎ되죠 ㅎ
강의하는건 제가 엔츠 리뉴얼 시킨다음;;;;;;
우선 이걸ㅇㅅㅇ
아시는분만 ㅎㅎㅎ
플래시 하고 xml지식이 있으신분만 ㅎ
알고 계세요 ㅎ
시중에서는 소스를 8~20 만원까지 판다죠;;-;;ㄷㄷ
플래시소스 -------------------------
function parseXMLdoc()
{
var _loc2 = myXML.firstChild.childNodes;
mainLen = _loc2.length - 1;
newMenu = new Array();
subLen = new Array();
for (i = 0; i < mainLen; i++)
{
subLen[i] = _loc2[i].childNodes.length;
newMenu[i] = new Object();
newMenu[i].title = _loc2[i].attributes.title;
newMenu[i].link = _loc2[i].attributes.link;
newMenu[i].target = _loc2[i].attributes.target;
newMenu[i].mCount = _loc2[i].attributes.mCount;
for (j = 0; j < _loc2[i].childNodes.length; j++)
{
newMenu[i][j] = new Object();
newMenu[i][j].title = _loc2[i].childNodes[j].attributes.title;
newMenu[i][j].link = _loc2[i].childNodes[j].attributes.link;
newMenu[i][j].target = _loc2[i].childNodes[j].attributes.target;
} // end of for
} // end of for
var _loc3 = myXML.firstChild.childNodes[mainLen].attributes;
for (var _loc4 in _loc3)
{
this[_loc4] = _loc3[_loc4];
} // end of for...in
xMenu = Number(xMenu);
yMenu = Number(yMenu);
mMenuSpace = Number(mMenuSpace);
sMenuSpace = Number(sMenuSpace);
mHeight = Number(mHeight);
sHeight = Number(sHeight);
sBorderView = 0;
subMargin = Number(subMargin);
menuMv._visible = 0;
var _loc5 = new TextFormat();
var _loc6 = new TextFormat();
_loc5.bold = true;
_loc6.bold = false;
subBar._visible = 0;
mBar._height = bar._height;
menuConfig();
} // End of the function
function loadSub(mc)
{
subInit(mc, mc.no);
for (var _loc2 = 0; _loc2 < subLen[mc.no]; ++_loc2)
{
mc.subMenu.sub._visible = 0;
_tc = mc.subMenu.sub.duplicateMovieClip("sub" + _loc2, _loc2 + 50);
_tc.no = _loc2;
_tc.txtMc.txt.autoSize = "left";
_tc.txtMc.txt.embedFonts = true;
_tc.txtMc.txt.text = newMenu[mc.no][_loc2].title;
_tc.txtMc.txt.setTextFormat(my_fmt);
_tc.txtMc.txt._xscale = sMenuXscale;
_tc.txtMc.txt._yscale = sMenuYscale;
_tc.area._width = _tc.ccOut.cc._width = _tc.ccOver.cc._width = _tc.txtMc.txt.textWidth + _tc.txtMc._x + sMenuSpace * 2;
_tc.borderMc._visible = sBorderView;
_tc.borderMc._x = _tc.area._width - sMenuSpace / 2;
mc.subMenu["sub" + (subLen[mc.no] - 1)].borderMc._visible = 0;
_tc.area._x = -sMenuSpace;
_tc.area._y = _tc.txtMc._y;
_tc.area._height = _tc.txtMc._height;
_tc.age = (_loc2 + 1) * -2;
_tc._alpha = 0;
mc.subMenu["sub" + _loc2]._x = mc.subMenu["sub" + (_loc2 - 1)]._x + mc.subMenu["sub" + (_loc2 - 1)].area._width;
if (_loc2 % newMenu[mc.no].mCount == 0)
{
mc.subMenu["sub" + _loc2]._x = 0;
} // end if
mc.subMenu["sub" + _loc2]._y = spaceY * int(_loc2 / Number(newMenu[mc.no].mCount)) + 5;
tw = mc.subMenu._width + subMargin * 2;
mc.mask.barMc._width = tw;
mc.subMenu._x = subMargin;
mc.barMv._x = mc.subMenu._x - 4;
mc.area._width = mc.subMenu._width + subMargin * 2;
mc.area._height = sHeight + spaceY * int(_loc2 / Number(newMenu[mc.no].mCount));
mc.barMv.barSet.Top._width = mc.barMv.barSet.Middle._width = mc.barMv.barSet.Bt._width = mc.subMenu._width;
mc.barMv.barSet.Middle._height = mc.barMv.barSet.leftM._height = mc.barMv.barSet.rightM._height = 3.000000E-001 + spaceY * int(_loc2 / Number(newMenu[mc.no].mCount));
mc.barMv.barSet.rightTop._x = mc.barMv.barSet.rightM._x = mc.barMv.barSet.rightBt._x = mc.barMv.barSet.Middle._width;
mc.barMv.barSet.leftBt._y = mc.barMv.barSet.Bt._y = mc.barMv.barSet.rightBt._y = mc.barMv.barSet.Middle._y + mc.barMv.barSet.Middle._height;
if (mc._x + tw > Stage.width)
{
mc._x = Stage.width - tw + 7;
} // end if
_tc.onRollOver = function ()
{
mainNum = mc.no + 1;
mc.subNum = this.no + 1;
};
_tc.onRollOut = function ()
{
mainInit();
subInit(mc, mc.no);
};
_tc.onRelease = function ()
{
getURL(route + newMenu[mainNum - 1][this.no].link, newMenu[mainNum - 1][this.no].target);
};
_tc.ccOut.cc.__proto__ = _tc.ccOver.cc.__proto__ = new mcColor();
_tc.ccOut.cc.setColor("0x" + subOutColor);
_tc.ccOver.cc.setColor("0x" + subOverColor);
_tc.onEnterFrame = function ()
{
if (this.age++ > 0)
{
var _loc2 = this._y;
targetY = spaceY * int(this.no / Number(newMenu[mc.no].mCount)) + 0;
this._y = 1.300000E+000 * (this._y - targetY) + -5.500000E-001 * (this.prevy - targetY) + targetY;
this._alpha = this._alpha + 5.000000E-001 * (100 - this._alpha);
this.prevy = _loc2;
} // end if
if (this.no == mc.subNum - 1)
{
this.nextFrame();
this.txtMc.txt.textColor = "0x" + subOverColor;
}
else
{
this.prevFrame();
this.txtMc.txt.textColor = "0x" + subOutColor;
} // end else if
};
mc.area.onRollOver = function ()
{
mainNum = mc.no + 1;
};
mc.area.onRollOut = function ()
{
mainInit();
};
} // end of for
} // End of the function
function mcColor()
{
this.setColor = function (code)
{
this.myObj = new Color(this);
this.myObj.setRGB(code);
};
} // End of the function
function mainInit()
{
if (mNum)
{
mainNum = mNum;
}
else
{
mainNum = undefined;
} // end else if
} // End of the function
function subInit(mc, no)
{
if (no + 1 == mNum)
{
mc.subNum = sNum;
}
else
{
mc.subNum = undefined;
} // end else if
} // End of the function
if (route == undefined)
{
route = "";
} // end if
myXML = new XML();
System.useCodepage = true;
myXML.ignoreWhite = true;
myXML.load(route + xmlRoute);
myXML.onLoad = function (success)
{
if (success)
{
parseXMLdoc();
}
else
{
myXML.load(route + xmlRoute);
} // end else if
};
var menuConfig = function ()
{
var _loc3 = 0;
spaceY = 16;
for (var _loc3 = 0; _loc3 < mainLen; ++_loc3)
{
_mc = this.attachMovie("menuMv", "menuMv" + _loc3, _loc3);
_sc = this.attachMovie("subBar", "subBar" + _loc3, _loc3 + 20);
_mc.no = _sc.no = _loc3;
_mc.menuMc.txtMc.menuTxt.txt.autoSize = "center";
_mc.menuMc.txtMc.menuTxt.txt.embedFonts = true;
_mc.menuMc.txtMc.menuTxt.txt.text = newMenu[_mc.no].title;
_mc.menuMc.txtMc.menuTxt.txt.setTextFormat(my_fmt);
_mc.barBG._width = _mc.menuMc.txtMc.menuTxt.txt.textWidth + mMenuSpace * 2;
_mc.menuMc.borderMc._visible = mBorderView;
_mc.menuMc.borderMc._x = _mc.menuMc.txtMc.menuTxt.txt.textWidth / 2 - 3 + mMenuSpace;
this["menuMv" + (mainLen - 1)].menuMc.borderMc._visible = 0;
this.menuMv0._x = 0 + xMenu;
this["menuMv" + _loc3]._x = this["menuMv" + (_loc3 - 1)]._x + this["menuMv" + (_loc3 - 1)].barBG._width;
_mc.menuMc._x = mMenuSpace + _mc.menuMc.txtMc.menuTxt.txt.textWidth / 2;
_mc._y = yMenu;
_mc.menuMc.txtMc.menuTxt.txt._xscale = mMenuXscale;
_mc.menuMc.txtMc.menuTxt.txt._yscale = mMenuYscale;
_sc._x = _mc._x - 10;
_sc._y = yMenu + mHeight;
_mc.onRollOver = function ()
{
mainNum = this.no + 1;
};
_mc.onRollOut = function ()
{
mainInit();
};
_mc.onRelease = function ()
{
getURL(route + newMenu[this.no].link, newMenu[this.no].target);
};
_mc.menuMc.ccOut.cc.__proto__ = _mc.menuMc.ccOver.cc.__proto__ = new mcColor();
_mc.menuMc.ccOut.cc.setColor("0x" + menuOutColor);
_mc.menuMc.ccOver.cc.setColor("0x" + menuOverColor);
_mc.onEnterFrame = function ()
{
if (this.no == mainNum - 1)
{
this.nextFrame();
this.menuMc.nextFrame();
this.menuMc.txtMc.menuTxt.scalex = 115 - this.menuMc.txtMc.menuTxt._yscale;
this.menuMc.txtMc.menuTxt._yscale = this.menuMc.txtMc.menuTxt._yscale + this.menuMc.txtMc.menuTxt.scalex * 3.000000E-001;
this.menuMc.txtMc.menuTxt._xscale = this.menuMc.txtMc.menuTxt._xscale + this.menuMc.txtMc.menuTxt.scalex * 3.000000E-001;
}
else
{
this.prevFrame();
this.menuMc.prevFrame();
this.menuMc.txtMc.menuTxt.scalex = 100 - this.menuMc.txtMc.menuTxt._yscale;
this.menuMc.txtMc.menuTxt._yscale = this.menuMc.txtMc.menuTxt._yscale + this.menuMc.txtMc.menuTxt.scalex * 3.000000E-001;
this.menuMc.txtMc.menuTxt._xscale = this.menuMc.txtMc.menuTxt._xscale + this.menuMc.txtMc.menuTxt.scalex * 3.000000E-001;
} // end else if
};
mBar.onEnterFrame = function ()
{
this.targetW = _root["menuMv" + (mainNum - 1)].barBG._width;
if (mainNum == undefined)
{
this.targetX = -200;
}
else
{
this.targetX = _root["menuMv" + (mainNum - 1)]._x;
} // end else if
this._x = this._x + 3.000000E-001 * (this.targetX - this._x);
this._width = this._width + 3.000000E-001 * (this.targetW - this._width);
};
_sc.onEnterFrame = function ()
{
if (this.no == mainNum - 1 && subLen[this.no] != 0)
{
this.nextFrame();
this.barMv.nextFrame();
}
else if (this.no == mainNum - 1 && (subLen[this.no] = 0))
{
this.prevFrame();
this.barMv.prevFrame();
}
else
{
this.prevFrame();
this.barMv.prevFrame();
} // end else if
};
} // end of for
var _loc4 = 0;
};
mainInit();
stop ();
-----------------------------------
XML 소스
<?xml version="1.0" encoding="EUC-KR"?>
<xmlMenu>
<!-- menui title=메뉴타이틀 link=링크경로 target=브라우저타겟설정 mCount=서브메뉴 열의 개수설정 -->
<menu1 title="엔츠소개" link="" target="_top" mCount="0">
<sub1 title="엔츠케스트" link="http://dlcast.ohpy.com/wpage/8" target="_top"/>
<sub2 title="쟈키소개" link="http://dlcast.ohpy.com/wpage/6" target="_top"/>
<sub3 title="방송시간표" link="http://dlcast.ohpy.com/wpage/5" target="_top"/>
</menu1>
<menu2 title="공지사항" link="" target="_top" mCount="0">
<sub1 title="공지사항" link="http://dlcast.ohpy.com/152286/0" target="_top"/>
<sub2 title="건의사항" link="http://dlcast.ohpy.com/362975/0" target="_top"/>
<sub3 title="매니져일지" link="http://dlcast.ohpy.com/362976/0" target="_top"/>
</menu2>
<menu3 title="가족모집" link="" target="_top" mCount="0">
<sub1 title="쟈키신청" link="http://dlcast.ohpy.com/152340/0" target="_top"/>
<sub2 title="매니져신청" link="http://dlcast.ohpy.com/152348/0" target="_top"/>
<sub3 title="홍보팀신청" link="http://dlcast.ohpy.com/231600/0" target="_top"/>
<sub4 title="팸신청" link="http://dlcast.ohpy.com/152349/0" target="_top"/>
</menu3>
<menu4 title="커뮤니티" link="" target="_top" mCount="0">
<sub1 title="가족사진" link="http://dlcast.ohpy.com/152791/0" target="_top"/>
<sub2 title="오프라인모임" link="http://dlcast.ohpy.com/362978/0" target="_top"/>
<sub3 title="순간스샷" link="http://dlcast.ohpy.com/154206/0" target="_top"/>
<sub4 title="점수올리기" link="http://dlcast.ohpy.com/362979/0" target="_top"/>
<sub4 title="등업신청" link="http://dlcast.ohpy.com/362982/0" target="_top"/>
<sub5 title="출석체크" link="http://dlcast.ohpy.com/152676/0" target="_top"/>
</menu4>
<menu5 title="자료실" link="" target="_top" mCount="0">
<sub1 title="방송관련자료" link="" target="_top"/>
<sub2 title="일반 자료실" link="http://dlcast.ohpy.com/154284/0" target="_top"/>
<sub3 title="정회원 자료실" link="http://dlcast.ohpy.com/362983/0" target="_top"/>
<sub4 title="우수회원 자료실" link="http://dlcast.ohpy.com/362984/0" target="_top"/>
</menu5>
<menu6 title="사연과신청곡" link="http://dlcast.ohpy.com/342026/0" target="_top" mCount="0">
</menu6>
<option
xMenu="10"
yMenu="0"
mMenuSpace="30"
sMenuSpace="5"
mHeight="29"
sHeight="29"
mMenuXscale="95"
mMenuYscale="105"
sMenuXscale="95"
sMenuYscale="110"
mBorderView = "1"
menuOutColor="FFFFFF"
menuOverColor="FFFBD5"
subOutColor="E9A815"
subOverColor="C1781B"
subMargin = "25"
/>
<!--
option에 적혀있는 변수는 다음과 같이 쓰입니다.
위의 변수값을 수정해 주시면 플래시 파일에 바로 적용됩니다.
xMenu = 메인메뉴가 시작되는 x좌표
yMenu = 메인메뉴가 시작되는 y좌표
mMenuSpace=메인메뉴간 간격
sMenuSpace=서브메뉴간 간격
mHeight=메인메뉴 버튼영역 높이
sHeight=메인메뉴 버튼영역(서브바) 높이
mMenuXscale=메인메뉴 텍스트 가로비율
mMenuYscale=메인메뉴 텍스트 세로비율
sMenuXscale=상위 선택된 메뉴텍스트 가로비율
sMenuYscale=상위 선택된 메뉴텍스트 세로비율
mBorderView=메인메뉴간 경계선 보임(1)/숨기기(0)
menuOutColor=대메뉴 평상시 색상
menuOverColor=대메뉴 선택되었을 때 색상
subOutColor=서브메뉴의 평상 컬러
subOverColor=서브메뉴 선택되었을 때 색상
subMargin=서브메뉴바의 좌우 여백
-->
</xmlMenu>
이상 엔츠 케스트 국장 천이후 ㅇㅅㅇ 아니다 허브&보리 였습니다.




