做了个flash对mc移动的控制,代码很简单:)
更新时间:2007年01月23日 00:00:00 作者:
复制代码 代码如下:
里面创建了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 Player的Javascript方法总结
可控制Flash Player的Javascript方法总结...2007-03-03
帮助你学习 Flash / ActionScript的12个网站
Adobe Flash是一个很好的技术,该技术允许开发人员加入的互动性和平稳的动画网页。 其受欢迎程度是如此巨大,您可以看到许多网站,致力于帮助开发者有兴趣在闪光。2008-12-12


最新评论