Tools: flash mx 2004
Ideas:
1. Blistered about random _x is shaking, you can set a variable for the variable x coordinate within a certain period of random value, value, let _x trend variables move, move to the variable point, then the variable re-value, _x and then move towards variable. _x always move to the variable.
2. Using attachMovie to copy the bubble, bubbles with unloadMovie achieve unloading.
3. To frame for recycling in order to produce more bubbles.
Practice:
The first step: New file, length and width for the 300 脳 200, background white, frame rate set to 60, allowing a number of bubbles flowing move a little bit faster.
Step two: paint bubbles, save for the mc, called pao.
Step Three: Add a new mc, named pp_mc, and set the output connection, called pp, to attachmovie call.鍦╩c鐨勫満鏅腑鎷栧叆pao锛屽潗鏍囦互闇?娉℃场鍑虹幇鐨勫ぇ浣撹寖鍥翠负鍑嗭紝鎴戣鐨勬槸x=98,y=10锛宲p_mc闇?瀹炵幇娉℃场鐨勯殢鏈虹Щ鍔紝鎵?互锛岄?瀹歱ao锛屾墦寮?ction闈㈡澘銆?Code:
onClipEvent (load) (
聽 a = random(140)+10;
聽 //褰搈c杞藉叆鏃讹紝棰勮a鍙橀噺銆俛鍙橀噺鏄帶鍒舵场娉¤繍鍔ㄦ柟鍚戠殑锛屽a杩涜10鍒?50涔嬮棿鐨勯殢鏈哄彇鍊?br />)
onClipEvent (enterFrame) (
if (this._x>a) {銆??銆??銆??銆??銆??銆??銆?br />聽 this._x = int(this._x)-1;
聽 this._y -= 1;
聽 this._alpha -= 0.01;
聽 if (this._alpha == 0) {
聽聽聽 this.unloadMovie();
)
} else if (this._x聽聽 this._x = int(this._x)+1;
聽 this._y -= 1;
聽 this._alpha -= 0.01;
聽 if (this._alpha == 0) {
聽聽聽 this.unloadMovie();銆??//褰撻?鏄庡害涓?鏃讹紝鍗歌浇娉℃场
)
//浠ヤ笂涓や釜鎵ц璇彞涓紝绗竴鍙ヤ负this._x鍙栨暣杩欎竴鐐瑰緢鍏抽敭锛屽洜涓哄鏋滀笉灏忓績娉℃场鐨剎鍧愭爣涓嶆槸鏁存暟锛屽埌鏈?帴杩慳鐨勯偅涓?鏃讹紝x鎬绘槸鏃犳硶绛変簬a锛宊x锛?灏卞皬浜巃锛屼細鎵цxa鐨勮鍙ワ紝杩欎篃鏄垜鍒氬仛鏃舵场娉℃?鏄繍琛屼竴娆″氨鐩寸嚎涓婂崌鐨勫師鍥犮?
聽 } else {
聽聽聽 a = random(140)+10;
)
}//x=a鏃讹紝瀵筧閲嶆柊鍙栧?
銆??绗洓姝ワ細鍥炲埌鍦烘櫙锛屽湪绗竴甯т笂鍐欏涓嬩唬鐮?br />
j=0;
//璁惧畾鎺у埗寰幆浠ヤ究浜х敓澶氫釜娉℃场鐨勫彉閲?j
銆??绗簲姝ワ細鍦ㄧ浜屽抚鍐欏涓嬩唬鐮?br />
_root.attachMovie("pp", "pp"+j, j);
//浠庡簱閲屽鍒舵场娉?br />_root["pp"+j]._x = random(140)+10;
//涓烘场娉¤瀹歺鍧愭爣鍊硷紝杩欓噷鏄?0鍒?50涔嬮棿鐨勯殢鏈哄?
_root["pp"+j]._y = 200;
//璁惧畾y鍧愭爣鍊?br />_root["pp"+j]._xscale = random(70)+30;
//30%鍒?00%鐨勯殢鏈簒缂╂斁鍊糭root["pp"+j]._yscale = _root["pp"+j]._xscale;
//30%鍒?00%鐨勯殢鏈簓缂╂斁鍊?br />绗叚姝ワ細绗笁甯т唬鐮佸涓?br />if (j<10) {
聽 //杩欎釜鍒ゆ柇涓簀璧嬫渶澶у?
聽 j = j+1;
) Else (
j = 0;
聽 //褰搄锛?0鏃讹紝j杩斿洖0鍊?br />)
gotoAndPlay (2);
銆??鍦ㄦ渶鍒濆仛杩欎釜娉℃场鏃讹紝鎴戞病鏈変负j璁惧畾鏈?ぇ鍊硷紝璁﹋涓嶆柇绱姞锛屽鑷磗wf鏂囦欢鏋佸崰cpu璧勬簮锛屽叾瀹?0涓场娉″浜庢垜鍋氱殑杩欎釜鍑虹幇棰戠巼灏卞浜嗭紝j鍙互鏍规嵁瀹為檯鎯呭喌璁惧畾銆?br />
銆??濂戒簡锛屼綘涔熷彲浠ュ仛涓场娉′簡锛岃繕鏈変竴鐐瑰氨鏄紝鎴戜负浜嗚娉℃场涓嶈鍑哄緱杩欎箞棰戠箒锛岃绗簩甯у拰绗笁甯т箣闂撮殧浜嗗ソ浜涗釜绌虹櫧甯э紝濡傛灉鎯冲涓?簺锛屾尐杩戜竴鐐瑰氨琛屼簡銆?br />銆??寰?笂鍗囨槸娉℃场锛屽鏋滃線涓嬮鍙互鍋氶洦锛岄洩浠?箞鐨勩?璇曡瘯鐪嬪惂 :p
銆??杩欎釜鏄湡浜哄竷缃殑浣滀笟锛屼负浜嗗姞娣卞嵃璞★紝鍐嶅啓涓?亶鏁欑▼銆傝窡澶у涓?捣瀛︿範
銆??绗竴娆″啓鏁欑▼锛屾湁璇寸殑涓嶆竻妤氱殑鍦版柟锛岃澶у鎸囧嚭锛屾湁璇寸殑涓嶅鐨勫湴鏂癸紝璇峰ぇ瀹舵寚鐐广? :)
相关链接:
convert .mod to .MPG
matroska format
Top Religion
Data Domain's Position Once Again Tend To NetApp
Shanghai university GRADUATES overall employment rate of 07 97.25%
ADO programming in the definition of the problem encountered by ATL
"Cottage" Toxic
reviews Geography EDUCATION
What is DIGITAL TV renovation project?
.avi to .mp4 converter
Youtube M2ts
Talent war broke out, the direct selling industry executives 300 000 -50 million annual salary
Catalogs GRAPHIC
In SDH / SONET 155M on carrying IP packet SOLUTION
Bohai Shipbuilding Heavy Industry under the overall management planning branch of the Digitization p
The SMTP user authentication based on QMail Setup Guide (Part Two)
No comments:
Post a Comment