今天在一个网页上看到一个网友写的QQ菜单,自己也做一个试试
先看效果:
===========代码如下================
this.onEnterFrame=function(){
for(var i=2;i<=4;i++){
this["mc"+i]._y+=(this["mc"+(i-1)]._height+this["mc"+(i-1)]._y-this["mc"+i]._y)/5;
}
}
for(var i=1;i<=4;i++){
this["mc"+i].btn_a.onPress=function(){
myplay();
this._parent.play();
};
}
function myplay(){
for(var i=1;i<=4;i++){
_root["mc"+i].gotoAndStop(1);
}
}
先看效果:
===========代码如下================
this.onEnterFrame=function(){
for(var i=2;i<=4;i++){
this["mc"+i]._y+=(this["mc"+(i-1)]._height+this["mc"+(i-1)]._y-this["mc"+i]._y)/5;
}
}
for(var i=1;i<=4;i++){
this["mc"+i].btn_a.onPress=function(){
myplay();
this._parent.play();
};
}
function myplay(){
for(var i=1;i<=4;i++){
_root["mc"+i].gotoAndStop(1);
}
}
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}