Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Flash AS½Ì³Ì:Ïêϸ½²½âMath¶ÔÏó

Math¶ÔÏó£¬×÷ΪһÃűà³Ì
ÓïÑÔ£¬½øÐÐÊýѧ¼ÆËãÊDZز»¿ÉÉٵġ£ÔÚÊýѧ¼ÆËãÖо­³£»áʹÓõ½Êýѧº¯Êý
£¬ÈçÈ¡¾ø¶ÔÖµ¡¢¿ª·½¡¢È¡Õû¡¢ÇóÈý½Çº¯ÊýÖµµÈ£¬»¹ÓÐÒ»ÖÖÖØÒªµÄº¯ÊýÊÇËæ»úº¯Êý¡£ActionScript½«ËùÓÐÕâЩÓëÊýѧÓйصķ½·¨¡¢³£Êý¡¢Èý½Çº¯ÊýÒÔ¼°Ëæ»úÊý¶¼¼¯Öе½Ò»¸ö¶ÔÏóÀïÃæ——Math¶ÔÏó¡£Math¶ÔÏóÊÇActionScriptµÄÒ»¿éÇÃÃÅש£¬Ö»ÓÐÕÆÎÕÁËËü£¬²ÅÄÜÕæÕý¶ÔActionScript¶¯»­
±à³Ì×öµ½ÔËÓÃ×ÔÈç¡£
1  Math¶ÔÏóµÄ·½·¨
1.1  Math.abs
Math¶ÔÏóÖм¯ºÏÁËÐí¶à³£ÓÃÊýѧº¯Êý¡£Math.abs¾ÍÊÇÓÃÀ´¼ÆËãÒ»¸öÊýµÄ¾ø¶ÔÖµ£¬¼´Ò»¸öÊýÈ¥µôÕý¸º·ûºÅºóµÄÖµ¡£ÆäÓ÷¨ÈçÏ£º
x=Math.abs(-9);
»ò£º
x=Math.abs(num1-num2);
11.1.2  Math.round
Math.round·½·¨½«Ò»¸ö¸¡µãÊýËÄÉáÎåÈëΪ×î½Ó½üµÄÕûÊý£¬È磺
trace(Math.round(9.4));
trace(Math.round(9.5));
trace(Math.round(-9.4));
trace(Math.round(-9.5));
trace(Math.round(-9.6));
Êä³ö´°¿ÚÖн«ÏÔʾ£º
9¡¢10¡¢-9¡¢-9¡¢-10
11.1.3  Math.ceil¡¢Math.floor
Math.ceil·½·¨È¡±ÈÒ»¸ö¸¡µãÊý´óÇÒ×î½Ó½üµÄÕûÊý£¬Math.floor·½·¨È¡±ÈÒ»¸ö¸¡µãÊýСÇÒ×î½Ó½üµÄÕûÊý¡£
È磺
trace(Math.ceil(9.1));
trace(Math.floor(9.1));
trace(Math.ceil(-9.1));
trace(Math.floor(-9.1));
Êä³ö´°¿ÚÖн«ÏÔʾ£º
10¡¢9¡¢-9¡¢-10
1.4  Math.min¡¢Math.max
Math.min·½·¨È¡Á½¸öÊýÖнÏСµÄÒ»¸öÊý£¬Math.max·½·¨È¡Á½¸öÊýÖнϴóµÄÒ»¸öÊý£¬È磺
trace(Math.min(9,
8));
trace(Math.max(9,
8));
Êä³ö´°¿ÚÖÐÏÔʾ£º
8¡¢9
1.5  Math.pow
Math.pow·½·¨ÓÃÀ´¼ÆËãÒ»¸öÊýµÄ³Ë·½£¬Ëü°üº¬Á½¸ö²ÎÊý£¬µÚ1¸ö²ÎÊýÊǵ×Êý£¨Òª³Ë·½µÄÊý£©£¬µÚ2¸ö²ÎÊýÊÇÃÝ£¨³Ë·½Êý£©¡£Èç¼ÆËã5µÄ3´Î·½£º
trace(Math.pow(5,
3));
Êä³ö´°¿ÚÖÐÏÔʾ£º
125
Math.pow·½·¨Ò²¿ÉÒÔ¼ÆËãÒ»¸öÊýµÄ¿ª·½£¬Èç¼ÆËã125µÄ¿ª3´Î·½£º
trace(Math.pow(125,
1/3));
Êä³ö´°¿ÚÖÐÏÔʾ
5
1.6  Math.sqrt
³ýÁËÓÃMath.pow¼ÆËãÒ»¸öÊýµÄ¿ª·½£¬»¹¿ÉÒÔʹÓÃMath.sqrt¼ÆËãÒ»¸öÊýµÄƽ·½¸ù£¬Èç¼ÆËã64µÄƽ·½¸ù£º
trace(Math.sqrt(64));
Êä³ö´°¿ÚÖÐÏÔʾ
8
ËüµÈͬÓÚ£º
trace(Math.pow(64,
1/2));
2  Math¶ÔÏóµÄ³£Êý
Math¶ÔÏóµÄ³£ÊýÓÐÒÔϼ¸¸ö£º
=
Math.PI£ºÔ²ÖÜÂÊ£¨´óԼΪ3.141593£©¡£
= Math.SQRT1_2£º1/2µÄƽ·½¸ùµÄµ¹Êý£¨´óԼΪ0.707107£©¡£
=
Math.SQRT2£º2µÄƽ·½¸ù£¨´óԼΪ1.414214


Ïà¹ØÎĵµ£º

ÍøÒ³µ¼º½²Ëµ¥±»FlashºÍ²¥·ÅÆ÷µÈ¶ÔÏóµ²×¡µÄ½â¾ö°ì·¨

ÍøÒ³µ¼º½²Ëµ¥±»FlashºÍ²¥·ÅÆ÷µÈ¶ÔÏóµ²×¡¿´²»µ½,·Ç³£Í·ÌÛ¡£ÆäʵÔÚ<object>±êÇ©ÖмÓÈëÒÔÏ´úÂë¾Í¿É½â¾ö:
<param name="wmode" value="Opaque">
ÀýÈçÓÐÈçÏ´úÂ룺
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player&qu ......

flash²âÊÔ »º´æ2

ÎÒ»¹ÊDZȽÏϲ»¶Ê¹ÓÃfirefoxÀ´·ÃÎÊÍøÕ¾£¬ieµÄ»º´æÊǽâ¾ö¿ÉÊÇÎÒµÄfirefoxû°ì·¨°¡
¸Õ¿ªÊ¼ÎÒÉèÖÃÁË
ÔÚµØÖ·À¸ÊäÈë about:config
ÐÞ¸Ä browser.cache.memory.enable Ϊfalse
²âÊÔºó·¢ÏÖ¸ù±¾Ã»ÓÐʲôÓð¡
û°ì·¨ÎÒ°Ñÿ¸ö¸úbrowser.cacheÏà¹ØµÄ¶¼µ½ÍøÉϲéÁËÒ»ÏÂ
browser.cache.check_doc_frequency Ô­À´ÕâÀï¿ÉÒÔÉèÖÃ
ÍøÉϵ ......

Flash/Flexѧϰ±Ê¼Ç(7)£ºFMS3.5»ùÓÚIISµÄ°²×°

Ò»°ãÀ´½²£¬ÔÚwindowsÉÏ°²×°Èí¼þ´ÓÀ´¶¼²»ÊÇʲôÄÑʶù£¬µ«FMSÈ´ÔÚ°²×°¹ý³ÌÖÐ"³äÂú"ÁËÎóµ¼£¨ºÃ°É£¬ÆäʵҲ¾ÍÊÇ¿äÕŵÄ˵·¨¶øÒÑ£©
 
1.ÏÂÔØFMS3.5
http://www.adobe.com/products/flashmediainteractive/?promoid=DJDTG
ÕâÉÏÃæÓÐÒ»¸öÃâ·Ñ¿ª·¢°æ(³ýÁËÁ¬½ÓÊýÓÐÏÞÖÆ£¬ÆäËü¹¦ÄÜÍêÈ«Ò»Ñù)
 
2.һ·Next°²×°
 ×¢ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ