做了個(gè)flash對(duì)mc移動(dòng)的控制,代碼很簡(jiǎn)單:)
更新時(shí)間:2007年01月23日 00:00:00 作者:
復(fù)制代碼 代碼如下:
里面創(chuàng)建了4個(gè)MC,分別是zzcn_top_mc zzcn_end_mc zzcn_left_mc zzcn_right_mc .
很簡(jiǎn)單的。。大家可以參考下哦。。呵呵。。
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
相關(guān)文章
在Flash中用as實(shí)現(xiàn)lrc歌詞動(dòng)態(tài)顯示
在Flash中用as實(shí)現(xiàn)lrc歌詞動(dòng)態(tài)顯示...2007-03-03
可控制Flash Player的Javascript方法總結(jié)
可控制Flash Player的Javascript方法總結(jié)...2007-03-03
Flash與后臺(tái)數(shù)據(jù)交換方法整理
Flash與后臺(tái)數(shù)據(jù)交換方法整理...2007-02-02
幫助你學(xué)習(xí) Flash / ActionScript的12個(gè)網(wǎng)站
Adobe Flash是一個(gè)很好的技術(shù),該技術(shù)允許開發(fā)人員加入的互動(dòng)性和平穩(wěn)的動(dòng)畫網(wǎng)頁。 其受歡迎程度是如此巨大,您可以看到許多網(wǎng)站,致力于幫助開發(fā)者有興趣在閃光。2008-12-12

