µÚÒ»·¶ÎÄÍø - רҵÎÄÕ·¶ÀýÎĵµ×ÊÁÏ·ÖÏíÆ½Ì¨

Flash - ActionScript±à³ÌÖÆ×÷ÎïÀí¿Î¼þʵÀý½Ì³Ì2012

À´Ô´£ºÓû§·ÖÏí ʱ¼ä£º2025/11/29 22:29:41 ±¾ÎÄÓÉloading ·ÖÏí ÏÂÔØÕâÆªÎĵµÊÖ»ú°æ
˵Ã÷£ºÎÄÕÂÄÚÈݽö¹©Ô¤ÀÀ£¬²¿·ÖÄÚÈÝ¿ÉÄܲ»È«£¬ÐèÒªÍêÕûÎĵµ»òÕßÐèÒª¸´ÖÆÄÚÈÝ£¬ÇëÏÂÔØwordºóʹÓá£ÏÂÔØwordÓÐÎÊÌâÇëÌí¼Ó΢ÐźÅ:xxxxxxx»òQQ£ºxxxxxx ´¦Àí£¨¾¡¿ÉÄܸøÄúÌṩÍêÕûÎĵµ£©£¬¸ÐлÄúµÄÖ§³ÖÓëÁ½⡣

Flash ActionScript±à³ÌÖÆ×÷ÎïÀí¿Î¼þʵÀý½Ì³Ì

¡¾Àý7-2˵Ã÷¡¿

¿ÉÓëÀý5-3¶Ô±È£¬Ìå»áʹÓÃforÑ­»·ºÍʹÓÃÖ¡Ñ­»·µÄÇø±ð¡£

¡¾Àý7-3£ºÀñ»¨±¬Õ¨Ð§¹û¡¿

1¡¢Ð½¨FlashÎĵµ£¬´óСÉèΪ£º550*400ÏóËØ¡£

2¡¢Ð½¨Ó°Æ¬¼ô¼­Ôª¼þ£ºball£¬ÔÚÖÐÐÄÊ®×Ö´¦»æÖÆÒ»Ö±¾¶10ÏóËØµÄСÇò¡£½«Ôª¼þÍÏÈëÖ÷³¡¾°(0,0)´¦£¬ÊµÀýÃû³ÆÉèΪball_mc¡£

3¡¢Ð½¨Ó°Æ¬¼ô¼­Ôª¼þ£ºdot£¬ÔÚÖÐÐÄÊ®×Ö´¦»æÖÆÒ»Ö±¾¶2ÏóËØµÄÔ²¡£½«Ôª¼þÍÏÈëÖ÷³¡¾°(0,0)´¦£¬ÊµÀýÃû³ÆÉèΪdot_mc¡£

4¡¢Ð½¨Á½¸ö°´Å¥£¬·Ö±ðдÈë¡°Ëé¿éÊýÔö¼Ó¡±ºÍ¡°Ëé¿éÊý¼õÉÙ¡±¡£½«Ôª¼þÍÏÈëÖ÷³¡¾°£¬ÊµÀýÃû³Æ·Ö±ðÉèΪ£ºnum_add_btnºÍnum_sub_btn¡£

5¡¢ÔÚÖ÷³¡¾°Ð½¨Ò»¸öÆÕͨÎı¾£¬Ð´È룺¡°Ëé¿éÊý£º¡±¡£Ð½¨Ò»¸ö¶¯Ì¬Îı¾£¬±äÁ¿´¦ÌîÈ룺block_num¡£

6¡¢Ð½¨action²ã£¬ÔÚaction²ãµÚһ֡дÈëActionScript£º var block_num:Number = 6; var v_out:Number = 5; var a:Number = 0.2; var t:Number;

var depth:Number = 1; //³õʼ±äÁ¿¸³Öµ var i:Number; var vx:Number; var vy:Number; //Öмä±äÁ¿¶¨Òå

num_add_btn.onRelease = function() { //СÇò¸öÊýÔö¼Ó°´Å¥ÏìÓ¦ if (block_num<=15) { block_num++; } gotoAndPlay(2); };

num_sub_btn.onRelease = function() { //СÇò¸öÊý¼õÉÙ°´Å¥ÏìÓ¦ if (block_num>=3) { block_num--; } gotoAndPlay(2); };

µÚ 45 Ò³ ¹² 79 Ò³

Flash ActionScript±à³ÌÖÆ×÷ÎïÀí¿Î¼þʵÀý½Ì³Ì

7¡¢ÔÚaction²ãµÚ¶þ֡дÈëActionScript£º for (i=1; i<=depth; i++) { //ɾ³ý¹ì¼£Ãîµã removeMovieClip(this[\}

depth = 1;

for (i=0; i<=block_num; i++) { //ɾ³ýÔ­ÓÐСÇò removeMovieClip(this[\}

for (i=0; i

8¡¢ÔÚaction²ãµÚÈý֡дÈëActionScript£º for (i=0; i

9¡¢ÔÚaction²ãµÚËÄ֡дÈëActionScript£º t++;

gotoAndPlay(3);

10¡¢ÓÃÆÕͨ֡²¹×ãÆäËûͼ²ã£¬±£´æ£¬·¢²¼¡£

¡¾Àý7-3˵Ã÷¡¿

¼ÙÉèÀñ»¨ÔÚ¿ÕÖб¬Õ¨ºó£¬Ë鯬¾ùÔÈÉ¢¿ª£¬±¾ÀýÖн«Æä¼ò»¯ÎªÍ¬Ò»Æ½ÃæÄÚ´ÓÔ²ÐľùÔȽǶȡ¢ÏàͬËÙ¶ÈÉä³öµÄСÇò£¬²¢ÇÒÃè»æÐ¡ÇòµÄ¹ì¼£¡£

ʹÓÃduplicateMovieClip()º¯Êý¸´ÖƳöµÄӰƬ¼ô¼­£¬¿ÉÒÔʹÓÃremoveMovieClip()º¯Êýɾ³ý£¬±¾ÀýÖÐÖØÖÃСÇòʱʹÓô˺¯Êýɾ³ýÉϴεĹ켣ÇúÏߺÍÉϴθ´ÖƳöµÄСÇò£¨±ÜÃâË鯬Êý¼õÉÙʱСÇòÈÔÈ»ÁôÔÚ³¡¾°ÄÚ£©¡£

µÚ 46 Ò³ ¹² 79 Ò³

Flash ActionScript±à³ÌÖÆ×÷ÎïÀí¿Î¼þʵÀý½Ì³Ì

¡¾Àý7-4£º²¨¶¯·½³Ì¡¿

1¡¢Ð½¨FlashÎĵµ£¬´óСÉèΪ550*400ÏóËØ¡£

2¡¢Ð½¨Ó°Æ¬¼ô¼­Ôª¼þ£ºball£¬ÔÚÔª¼þÖÐÐÄÊ®×Ö´¦»æÖÆÖ±¾¶10ÏóËØµÄСÇò¡£½«Ôª¼þÍÏÖÁ³¡¾°(0,0)´¦£¬ÊµÀýÃû³ÆÉèΪball_mc¡£

3¡¢Ð½¨action²ã£¬ÔÚaction²ãµÄµÚһ֡дÈëActionSctipt£º var w:Number = 0.1;

//ÿ¸öСÇòÕñ¶¯µÄԲƵÂÊ var w2:Number = 0.1; //²¨ÖÐÿ¸öСÇòµÄÑÓ³Ù var l:Number = 100; var t:Number = 0;

for (var i:Number = 1; i<55; i++) { duplicateMovieClip(\ this[\ this[\}

4¡¢ÔÚaction²ãµÚ¶þ֡дÈëActionScript£º for (i=1; i<55; i++) { this[\}

5¡¢ÔÚaction²ãµÚÈý֡дÈëActionScript£º t++;

gotoAndPlay(2); 6¡¢±£´æ£¬·¢²¼¡£

¡¾Àý7-5£º²¨µÄµþ¼Ó¡¿

1¡¢ÔÚÀý7-4»ù´¡ÉϼÌÐø½øÐÐÐ޸ġ£

2¡¢ÔÚactionµÚÒ»Ö¡×·¼ÓActionScript£º var w_r:Number = 0.15; var w_r2:Number = 0.25; var l_r:Number = 50;

3¡¢½«actionµÚ¶þÖ¡ActionScript¸ÄΪ£º i = 1;

while (i<55) { this[\ i++; }

4¡¢Áí´æÎªÀý7-5£¬·¢²¼¡£

µÚ 47 Ò³ ¹² 79 Ò³

Flash ActionScript±à³ÌÖÆ×÷ÎïÀí¿Î¼þʵÀý½Ì³Ì

¡¾Àý7-5˵Ã÷¡¿

±¾ÀýÖн«µÚ¶þÖ¡ÖеÄforÑ­»·»»³ÉÁËwhileÑ­»·£¬Ð§¹ûÊǵȼ۵ģ¬Í¬Ñ§ÃÇ¿ÉÒԱȽÏÒ»ÏÂÕâÁ½ÖÖÑ­»·Ð´·¨µÄÇø±ð¡£whileÑ­»·µÄÒ»°ãÐÎʽΪ£º while(Ìõ¼þ){ Óï¾ä;

}

do¡­whileÑ­»·µÄÒ»°ãÐÎʽΪ£º do{ Óï¾ä

}while(Ìõ¼þ);

×¢Òâ¼ÓÁ˻ҵ׵Äi++; ÊDZØÐëµÄ£¬Èç¹ûûÓеϰwhileÑ­»·½«»áһֱѭ»·ÏÂÈ¥£¬µ¼ÖÂflash¶¯»­µÄÔËÐÐËÙ

¶È·Ç³£»ºÂý¡£Flash²¥·ÅÆ÷½«»áÒò´Ë¶ø±¨¾¯Ìáʾ£¨Èçͼ£©¡£

whileÑ­»·Èç¹ûʹÓÃÀàËÆforÑ­»·ÖÐiÕâÑùµÄÑ­»·±äÁ¿¿ØÖÆÑ­»·´ÎÊýµÄ»°£¬ÐèÒª½«Ñ­»·±äÁ¿µÄÐÞ¸Ä×÷ΪÓï¾äÖеÄÒ»²¿·Ö£¬Òò´ËÓÐʱ²»ÈçforÑ­»··½±ã¡£µ«ÊÇÔÚÓÐÊÂÎÞÐèµ¥¶ÀµÄÑ­»·±äÁ¿Ê±£¬»òÕßÑ­»·´ÎÊýÄÑÓÚÔ¤ÏȹÀ¼ÆÊ±£¬whileºÍdo¡­whileÑ­»·¾Í·Ç³£µÄ·½±ãÁË¡£Àý7-2ÖлæÖƵIJ¿·ÖÇúÏßÒѾ­ÔÚflashÏÔʾ·¶Î§Ö®ÍâÁË£¨y>400£©£¬ËùÒÔ¿ÉÒÔ½«³ÌÐòÐÞ¸ÄΪÀý7-6£º var vx:Number = 5; var vy:Number = 10; var a:Number = 0.2; var i:Number = 0; do { i++; duplicateMovieClip(\ this[\ this[\} while (this[\

¡¾ÆäËûºÍÑ­»·Ïà¹ØµÄһЩÄÚÈÝ¡¿

for(¸´Êö±äÁ¿in¶ÔÏó){¶¯×÷}

for?inÊǺÜÓÐȤµÄÒ»ÖÖÑ­»·»úÖÆ£¬for?inÑ­»·²»ÐèÒªÌõ¼þÓï¾ä£¬ÕâÖÖÑ­»·ÀûÓÃÒ»¸ö²éÕÒ¡ªÌæ»»¹Ø¼ü×ֵĻúÖÆ½øÐй¤×÷¡£

Àý7-7¶¯»­ÖÐÓÐ10¸öСÇò£¬ÊµÀýÃû·Ö±ðÊÇclip_1¡¢Clip_2??£¬ÎÒÃǵ±È»¿ÉÒÔʹÓÃ×Ö·û´®±í´ïʽ¼ÆËãʵÀýÃû³Æ£¬Ò²¿ÉÒÔʹÓÃfor?inÑ­»·£¬ÕâÔÚʵÀýÃû²»ÖªµÀ»òÕßʵÀýÃûÄÑÒÔÓÃÒ»¸ö×Ö·û´®±í´ïʽ±íÊ¾Ê±ÌØ±ðÓÐÓô¦¡£²»¹ý£¬for?inÑ­»·Ö»ÄÜÓÃÓÚ¶ÔÏóºÍÊý×飬²¢ÇÒ²»ÊǶÔÔªËØµÄËùÓÐÊôÐÔ¶¼¿ÉÒÔÕâÑù½øÐС£

µÚ 48 Ò³ ¹² 79 Ò³

ËÑË÷¸ü¶à¹ØÓÚ£º Flash - ActionScript±à³ÌÖÆ×÷ÎïÀí¿Î¼þʵÀý µÄÎĵµ
Flash - ActionScript±à³ÌÖÆ×÷ÎïÀí¿Î¼þʵÀý½Ì³Ì2012.doc ½«±¾ÎĵÄWordÎĵµÏÂÔØµ½µçÄÔ£¬·½±ã¸´ÖÆ¡¢±à¼­¡¢ÊղغʹòÓ¡
±¾ÎÄÁ´½Ó£ºhttps://www.diyifanwen.net/c7ztk821b824bptb10m40_12.html£¨×ªÔØÇë×¢Ã÷ÎÄÕÂÀ´Ô´£©
ÈÈÃÅÍÆ¼ö
Copyright © 2012-2023 µÚÒ»·¶ÎÄÍø °æÈ¨ËùÓÐ ÃâÔðÉùÃ÷ | ÁªÏµÎÒÃÇ
ÉùÃ÷ :±¾ÍøÕ¾×ðÖØ²¢±£»¤ÖªÊ¶²úȨ£¬¸ù¾Ý¡¶ÐÅÏ¢ÍøÂç´«²¥È¨±£»¤ÌõÀý¡·£¬Èç¹ûÎÒÃÇ×ªÔØµÄ×÷Æ·ÇÖ·¸ÁËÄúµÄȨÀû,ÇëÔÚÒ»¸öÔÂÄÚ֪ͨÎÒÃÇ£¬ÎÒÃǻἰʱɾ³ý¡£
¿Í·þQQ£ºxxxxxx ÓÊÏ䣺xxxxxx@qq.com
ÓåICP±¸2023013149ºÅ
Top