醒着☆☆

H5 Laya Native Game

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::
函数里的参数,其他的不多说。
为了改善一个功能函数。
功能函数有类似Tween的代码。
如果想 让第一个Tween执行完,便执行第二个Tween
------------------------------------------------
stop();
function tweenTotal(mc,property, endProperty,funnext) {
   mc.onEnterFrame=function(){
       this[property]+= 0.5*(endProperty-this[property]);
       if(this[property]== endProperty){
       delete this.onEnterFrame;
       funnext();
       }
 }
tweenTotal(ball,"_y",250,fun);
function fun() {
 trace("ddd");
}
posted on 2009-07-21 15:18  醒着/☆☆  阅读(190)  评论(0编辑  收藏  举报