页面导航: 首页图形动画FlashFlash As → 正文内容

做了个flash对mc移动的控制,代码很简单:)

发布:dxy 字体:[增加 减小] 类型:转载

里面创建了4个MC,分别是zzcn_top_mc zzcn_end_mc zzcn_left_mc zzcn_right_mc .
很简单的。。大家可以参考下哦。。呵呵。。
var place_x:Number = _xmouse;
var place_y:Number = _ymouse;
var sulv:Number = 6;
zzcn_top_mc.onEnterFrame = function(){
this._x += (place_x - this._x)/sulv;
place_x = _xmouse;
};
zzcn_end_mc.onEnterFrame = function(){
this._x += (place_x - this._x)/sulv;
place_x = _xmouse;
};
zzcn_left_mc.onEnterFrame = function(){
this._y += (place_y - this._y)/sulv;
place_y = _ymouse;
};
zzcn_right_mc.onEnterFrame = function(){
this._y += (place_y - this._y)/sulv;
place_y = _ymouse;
};

http://www.zzcn.net/blog/attachments/month_0612/l2006121018639.swf
浏览次数:载入中... 打印本文关闭本文返回首页
·在百度中搜索关于“做了个flash对mc移动的控制,代码很简单:)相关内容

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行