御龙在天 五虎将 俸禄:flash导航栏链接的一个问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/19 16:52:36
我想在点击菜单时是跳转到另一个flash当中去,怎么加链接呢?急等!~谢谢各位高手了~~
(下面是源码)

var menu_Lables=new Array("","理念","团队","作品","服务","异术","联系方式","");
var menu_URLs=new Array("#","/home","/Service","/Products","/Solution","/About","/Feedback","#");
var menu_minScale=100;
var menu_maxScale=130;
var menu_StartX=530;
var menu_StartY=350;
var IconNumber=9;
var Icon_minScale=30;
var Icon_maxScale=60;
var Icon_Space=2;

var DockMenu=createEmptyMovieClip("dmenu",10);
DockMenu._x=menu_StartX;
DockMenu._y=menu_StartY;
for(var i=0;i<IconNumber;i++){
var theItem=DockMenu.attachMovie("icon"+i,"item"+i,i+10);
theItem.attachMovie("label","ilabel",10);
theItem.preItem=DockMenu["item"+(i-1)];
theItem._x=theItem.preItem._x+theItem.preItem._width+Icon_Space;
theItem.ilabel.label.text=menu_Lables[i];
theItem.ilabel._visible=false;
theItem.URL=menu_URLs[i];
theItem._xscale=Icon_minScale;
theItem._yscale=Icon_minScale;
theItem.onRollOver=function(){
this.ilabel._visible=true;
}
theItem.onRollOut=theItem.onReleaseOutside=function(){
this.ilabel._visible=false;
}
theItem.onRelease=function(){
getURL(this.URL);
}
theItem.onEnterFrame=function(){
if(this._parent.mover){
var scale=Icon_maxScale-Math.abs(DockMenu._xmouse-this._x-30)/5;
if (scale<Icon_minScale) scale=Icon_minScale;
this._xscale+=(scale-this._xscale)/3;
this._yscale+=(scale-this._yscale)/3;
}
if(this._parent.mout){
this._xscale+=(Icon_minScale-this._xscale)/3
this._yscale+=(Icon_minScale-this._yscale)/3
}
this._x+=(this.PreItem._x+this.PreItem._width+Icon_Space-this._x)/3;
}
}
var theBGBox=DockMenu.attachMovie("bgbar","bgbox",1);
theBGBox.onEnterFrame=function(){
this._x=DockMenu["item0"]._x;
this._width=DockMenu["item"+(IconNumber-2)]._x+DockMenu["item"+(IconNumber-2)]._width-DockMenu["itemCon"]._x;
}

DockMenu.onEnterFrame=function(){
if(this.mover){
this._xscale+=(menu_maxScale-this._xscale)/4;
this._yscale+=(menu_maxScale-this._yscale)/4;
}
if(this.mout){
this._xscale+=(menu_minScale-this._xscale)/4;
this._yscale+=(menu_minScale-this._yscale)/4;
}
this._x+=(-this._width/2+menu_StartX-this._x)/3;
}

DockMenu.onMouseMove=function(){
if(this.hitTest(_root._xmouse,_root._ymouse,false)){
this.mover=true;
this.mout=false;
}else{
this.mover=false;
this.mout=true;
}
}
luiyang你好,因为我不太懂AS,但又必须要做出这个效果,所以请你帮我写一下好吗?谢谢了~~~~

加到动作里