Flex LogÄ£¿éÈëÃż°À©Õ¹
£¨Ò»£©ÈëÃÅ
Flex¼¯³ÉÒ»¸öLog¿ò¼Ü£¬¿ÉÒÔÍê³ÉºÜ¶àÓÃtrace()×ödebugʱÍê³É²»Á˵ŦÄÜ
Êä³ölogʱ¿ÉÒÔʵÏֵַȼ¶£¨¹²5+1¼¶£©£¬ÓùýÂËÆ÷Ö¸¶¨Êä³öµÄÀ࣬ÒÔ¼°Êä³ö·½Ê½£¨Ä¬ÈÏΪtrace£©
ÐèÒªÓõ½µÄÀà
¸ÃÀàλÓÚmx.logging°üÖУ¬
¹²ÐèÒªÈý¸öÀàºÍÒ»¸ö½Ó¿Ú
mx.logging.Log – Ö÷À࣬Óм¸¸ö¾²Ì¬·½·¨£¬Ìí¼Ó/ÒƳýTraceTargetºÍ»ñÈ¡ILogger
mx.logging.LogEventLevel – ¶¨ÒåÁËlogµÈ¼¶µÄ³£Á¿
mx.logging.targets.TraceTarget – loggerÆ÷£¬¶¨ÒålogÊä³öµÈ¼¶£¬¹ýÂËÆ÷ºÍÊä³ö·½Ê½
mx.logging.ILogger – ÓÉLog.getLogger(‘ClassName’)»ñÈ¡µ½µÄLogger·¢ËÍÆ÷
ʹÓò½Öè
1.. н¨TraceTarget
var traceTarget:TraceTarget = new TraceTarget();
traceTarget.filters = ['spark.components.*','myPackage.MyClass']; //´´½¨¹ýÂËÆ÷£¬¿ÉÒÔÖ±½ÓÓÃclassÃû£¬Ò²¿ÉÒÔʹÓÃ*Àà¹ýÂËÕû¸ö°ü
traceTarget.filters = [*]; //ÕâÑùд¹ýÂËÆ÷£¬¾ÍÊÇÊä³öÈ«²¿ÀàÁË
traceTarget.includeDate = true; //Êä³öÐÅÏ¢ÊÇ·ñ°üº¬ÈÕÆÚ
traceTarget.includeTime = true; //Êä³öÐÅÏ¢ÊÇ·ñ°üº¬Ê±¼ä
traceTarget.includeLevel = true; //Êä³öÐÅÏ¢ÊÇ·ñ°üº¬µÈ¼¶
traceTarget.includeCategory = true; //Êä³öÐÅÏ¢ÊÇ·ñ°üº¬classÃû
traceTarget.level = LogEventLevel.INFO; //É趨Êä³öµÄµÈ¼¶
LogµÈ¼¶ËµÃ÷
log¹²·ÖΪ5¼¶ºÍALL
·Ö±ðÊÇALL(0), DEBUG(2), INFO(4), WARN(6), ERROR(8), FATAL(1000)
ÿ¸öµÈ¼¶ÔÚÊä³öʱ¶¼°üº¬ÁË×ÔÉí¼°ºóÐøµÈ¼¶µÄÐÅÏ¢
¼´µ±°ÑµÈ¼¶É趨ΪINFOʱ£¬INFO, WARN, ERROR, FATALÖеÄÐÅÏ¢¶¼»á±»Êä³ö£¬¶øÅÅÔÚINFOÇ°ÃæµÄDEBUGÔò²»»á±»Êä³ö
2. ½«TraceTargetÌí¼Óµ½LogÖÐ
Log.addTarget(traceTarget);//¿ÉÒÔaddTarget¶à¸öTraceTarget£¬ÒÔ±ãÓÚÓò»Í¬·½Ê½¸ú×Ù²»Í¬µÄÐÅÏ¢
//ÒƳýµÄ·½·¨£ºLog.removeTarget(traceTarget);
»ñÈ¡ILogger²¢Êä³ö
var info:ILogger = Log.getLogger(‘myPackage.MyClass’); //»ñÈ¡ILogger£¬getLoggerµÄ²ÎÊýÓÃÓÚ¹ýÂËÆ÷ʹÓÃ
info.info(‘trace log massege’); //Êä³öÖ¸¶¨µÈ¼¶µÄlogÐÅÏ¢
info.debug(‘trace log massege‘,’trace log massege2′); //²ÎÊý¿ÉÒÔÈÎÒâ¸ö£¬Óëtrace()Ïàͬ
info.error(‘trace log massege‘);
info.warn(‘trace log massege‘);
info.fatal(‘trace log massege‘);
info.log(LogEventLevel.INFO,&rs
Ïà¹ØÎĵµ£º
Óõ½µÄMX±êÇ©£ºconstraintColumns¡¢ConstraintColumn¡¢constraintRows¡¢ConstraintRow
¸ø´ó¼Ò˵˵ǰÌáÇé¿ö£ºÔÚ×öMXML²¼¾Öʱ£¬ÒªÇ¶Ì׺ܶà²ã¼¶£¬ÕâÀïÃæÓкܶàÎÊÌ⣺
1¡¢Ç¶Ì×Ì«¶à²ã¼¶»áÓ°ÏìЧÂÊ£¡
2¡¢Ç¶Ì×Ì«¶à²ã¼¶£¬´úÂëµÄ¿É¶ÁÐÔ¡¢¿Éά»¤ÐԲ
3¡¢Ç¶Ì×Ì«¶à²ã¼¶ÊÇÒòΪCanvas¡¢Vbox¡¢Hbox¹¦Äܵ¥Ò»£¬²»ÄÜÂú×ãÐèÒª£¬¶ø²»ÊDZØÐ ......
ת×Ô£ºhttp://hi.baidu.com/wosinmaiken/blog/item/ee59f7a8f72604bdca130c24.html
/**ceil ÏòÇ°(ÊýÖáÏòÓÒ)È¡Õû(·µ»ØֵΪNumber)**/
trace(Math.ceil(10.4)); //11
trace(Math ......
ÕâÁ½Ìì¿´Á˹«Ë¾ÀÏ×ÜÑÝʾµÄÒ»¸öЧ¹û£¬ÈÈͼ·Ö²¼Çé¿ö£¬¸Ð¾õºÜÖ±¹Û¡£¹úÄÚµØͼÉϺÜÉÙÓÐÕâÖÖ±íÏÖ·½Ê½µÄ¡£
gÁËһϷ¢ÏÖÒÔÏ£º·¢ÏÖflexÏÂÓÐ IBM ILOG Elixir ¿ÉÒÔÓ㬲»¹ýÕâÒª»¨Ç®¡£
https://www.adobe.com/cn/products/flex/ibmilogelixir/
»¹ÓÐÒ»¸öHeat API£¬¿ÉÒÔÔÙgooglemapÉϵþ¼ÓÈÈͼ¡£
http://www.heatmapapi.com/ £¬ ......
FlexÀïÃ棬DataGridµÄcolumnµÄwidthÊôÐÔ²»½ÓÊܰٷֱȣ¬Ö»½ÓÊÜÒ»¸ö¾ßÌåµÄÏñËØÖµ£¬ËùÒÔ£¬Èç¹ûÏë°´ÕÕ±ÈÀýÀ´ÉèÖÃÁпíÐèÒª·ÑЩÖÜÕÛ¡£GoogleÁËһϣ¬ÓÐÁ½ÖÖ·½·¨¿ÉÒÔ×öµ½£º µÚÒ»ÖÖ·½·¨£¬²»ÒªÉèÖÃwidthΪ°Ù·Ö±È£¬¶øÉèÖÃΪһ¸öСÊý£¬ËùÓÐÁеÄСÊýÖµµÄºÍ±ØÐëΪ1¡£ <mx:DataGrid width="100%" height="100%" ......
ÓÃFlex4¼ÓÔØFlex3µÄ×é¼þʱ£¬·¢ÏÖÁËÕâ¸öÎÊÌ⣺
µ±ÓÃsparkÌí¼ÓÒ»¸ömx×é¼þʱ²»»áÓÐÎÊÌ⣬µ«µ±Õâ¸ömx×é¼þÖл¹ÓÐÆäËû×é¼þ
ÀýÈç<mx:HBox><mx:Canvas/></mx:HBox>±»Ìí¼Óµ½<s:Group></s:Group>
(×¢£ºÍ¨¹ýAS´úÂëʹÓÃaddElement()Ìí¼Ó£¬¶ø²»ÊÇÖ±½Óдµ½mxmlÖÐ)
stage.frameRate»á˲¼ä´ïµ½1000£¡
Ö® ......