第二步:创建影片剪辑,在里面画一个小三角形,在三角形旁边拉一个动态文本,实例名为my_txt;把该影片剪辑放在主场景中,实例名为zhisi_mc
第三步:把按钮做些动画效果
第四步:在最后一帧上写如下代码:
stop();
zhisi_mc._x = _btn0._x;
var my_array:Array = new Array("首页", "动画", "文章", "教程", "相册", "留言");
var url_array:Array = new Array("http://qzgzs.51.net", "http://qzgzs.51.net/flash/donghua.html", http://qzgzs.51.net/wenzhang/wenzhang.html,
"http://qzgzs.51.net/jiaocheng/jiaocheng.html","http://qzgzs.51.net/xiangce/xiangce.html", "http://guestbook.new-youth.com/script/user/list.asp?userid=5640");
for (var d:Number = 5; d>=0; d--) {
this["_btn"+d].id = d;
this["_btn"+d].onRollOver = function() {
zhisi_mc.my_txt.text = my_array[this.id];
_btnX = this._x;
zhisi_mc.onEnterFrame = function() {
this._x += (_btnX-this._x)/4;
if (this._x == 0) {
delete this.onEnterFrame;
}
};
};
this["_btn"+d].onRelease = function() {
getURL(url_array[this.id]);
};
}