最近学习FLASH,遇到了一个小疑点
最近学习FLASH,遇到了一个小问题
function xml_load()
{
url_xml.load(xml_url);
url_xml.onLoad = function (sucess)
{
if (sucess)
{
url_data = this.firstChild.childNodes;
menu_len = url_data.length -1;
var _l2 = 1;
while (_l2 < menu_len)
{
var _l3 = url_data[_l2 + 1].childNodes.length;
sub_len_arr.push(_l3);
_l2++;
}
gotoAndPlay("sucess");
}
};
}
function mc_move(num, target)
{
removeMovieClip("holder" + num);
var tgClip = this["main" + num + "_mc"];
this.createEmptyMovieClip("holder"+num,num);
this["holder" + num].onEnterFrame = function ()
{
tgClip._x = tgClip._x + speed * (target - tgClip._x);
if (Math.round(tgClip._x) == target)
{
removeMovieClip(this);
} // end if
};
}
function dbkim(num)
{
if (num < 10)
{
temp_dbkim = "0" + num;
}
else
{
temp_dbkim = String(num);
} // end if
return(temp_dbkim);
} // End of the function
function menu_slide(num)
{
if (num == 1)
{
mc_move(2,350);
mc_move(3,450);
mc_move(4,555);
mc_move(5,655);
mc_move(6,760);
}
else if (num == 2)
{
mc_move(1,280);
mc_move(3,460);
mc_move(4,565);
mc_move(5,665);
mc_move(6,770);
}
else if (num == 3)
{
mc_move(1,280);
mc_move(2,350);
mc_move(4,565);
mc_move(5,665);
mc_move(6,770);
}
else if (num == 4)
{
mc_move(1,280);
mc_move(2,350);
mc_move(3,460);
mc_move(5,665);
mc_move(6,770);
}
else if (num == 5)
{
mc_move(1,280);
mc_move(2,350);
mc_move(3,460);
mc_move(4,565);
mc_move(6,770);
}
else if (num == 6)
{
mc_move(1,280);
mc_move(2,350);
mc_move(3,460);
mc_move(4,565);
mc_move(5,665);
}
else if (num == 0)
{
mc_move(1,275);
mc_move(2,340);
mc_move(3,440);
mc_move(4,545);
mc_move(5,645);
mc_move(6,750);
} // end if// end if
} // End of the function
function menu_con(num, over, push)
{
var _l4 = this["main" + num + "_mc"];
var _l6 = this["menu" + num + "_sub"];
if (over)
{
menu_slide(num);
_l4.onEnterFrame = function ()
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
delete this["onEnterFrame"];
} // end if
};
_l6.onEnterFrame = function ()
{
this.nextFrame();
if (this._currentframe == this._totalframes)
function xml_load()
{
url_xml.load(xml_url);
url_xml.onLoad = function (sucess)
{
if (sucess)
{
url_data = this.firstChild.childNodes;
menu_len = url_data.length -1;
var _l2 = 1;
while (_l2 < menu_len)
{
var _l3 = url_data[_l2 + 1].childNodes.length;
sub_len_arr.push(_l3);
_l2++;
}
gotoAndPlay("sucess");
}
};
}
function mc_move(num, target)
{
removeMovieClip("holder" + num);
var tgClip = this["main" + num + "_mc"];
this.createEmptyMovieClip("holder"+num,num);
this["holder" + num].onEnterFrame = function ()
{
tgClip._x = tgClip._x + speed * (target - tgClip._x);
if (Math.round(tgClip._x) == target)
{
removeMovieClip(this);
} // end if
};
}
function dbkim(num)
{
if (num < 10)
{
temp_dbkim = "0" + num;
}
else
{
temp_dbkim = String(num);
} // end if
return(temp_dbkim);
} // End of the function
function menu_slide(num)
{
if (num == 1)
{
mc_move(2,350);
mc_move(3,450);
mc_move(4,555);
mc_move(5,655);
mc_move(6,760);
}
else if (num == 2)
{
mc_move(1,280);
mc_move(3,460);
mc_move(4,565);
mc_move(5,665);
mc_move(6,770);
}
else if (num == 3)
{
mc_move(1,280);
mc_move(2,350);
mc_move(4,565);
mc_move(5,665);
mc_move(6,770);
}
else if (num == 4)
{
mc_move(1,280);
mc_move(2,350);
mc_move(3,460);
mc_move(5,665);
mc_move(6,770);
}
else if (num == 5)
{
mc_move(1,280);
mc_move(2,350);
mc_move(3,460);
mc_move(4,565);
mc_move(6,770);
}
else if (num == 6)
{
mc_move(1,280);
mc_move(2,350);
mc_move(3,460);
mc_move(4,565);
mc_move(5,665);
}
else if (num == 0)
{
mc_move(1,275);
mc_move(2,340);
mc_move(3,440);
mc_move(4,545);
mc_move(5,645);
mc_move(6,750);
} // end if// end if
} // End of the function
function menu_con(num, over, push)
{
var _l4 = this["main" + num + "_mc"];
var _l6 = this["menu" + num + "_sub"];
if (over)
{
menu_slide(num);
_l4.onEnterFrame = function ()
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
delete this["onEnterFrame"];
} // end if
};
_l6.onEnterFrame = function ()
{
this.nextFrame();
if (this._currentframe == this._totalframes)