三九宝宝网宝宝教育学龄段教育

flash代码分析

01月07日 编辑 39baobao.com

this._x = _root.core2._x; //当前影片剪辑的横坐标为场景里面的影片core2的横坐标 this._y = _root.core2._y; //同上,纵坐标 this._xscale = _root.menu2._x-_root.core2._x; //当前影片剪辑的横向缩放比为场景里面的影片menu2的横坐标-场景里面的影片core2的横坐标 this._yscale = _root.menu2._y-_root.core2._y; //同上,纵向缩放比,纵坐标 -------------------------- this._x = this._x+((xpos-this._x)/5); this._y = this._y+((ypos-this._y)/5); 目的:xpos和ypos是目的地,每次执行时,这个影片剪辑向目的地坐标移动五分之一,实现缓动的效果

推荐阅读
图文推荐