FLEXÈÝÆ÷µÄ²¼¾Ö¹æÔò
FLEXÖÐËùÓеIJ¼¾Ö¶¼ÐèÒªÈÝÆ÷¡£<mx:Application>±êǩʵ¼ÊÉϾÍÊÇÒ»¸öÈÝÆ÷¡£Ã¿¸öÈÝÆ÷¶¼ÓÐÒ»¶¨µÄ¹æÔòÀ´È·¶¨×ÓÔªËصÄÅÅÁз½Ê½£¬Ò²¾ÍÊDZ¾ÎÄÌÖÂÛµÄFLEXÈÝÆ÷²¼¾Ö¹æÔò¡£
VBox
×ÓÔªËØÑØ´¹Ö±·½ÏòÅÅÁС£Ã¿¸ö×ÓÔªËض¼»á»æÖÆÔÚÇ°Ò»¸ö×ÓÔªËصÄÏ·½¡£
HBox
×ÓÔªËØÑØˮƽ·½ÏòÅÅÁС£Ã¿¸ö×ÓÔªËض¼»á»æÖÆÔÚÇ°Ò»¸ö×ÓÔªËصÄÓÒ·½¡£
Canvas
°´¿ª·¢ÕßÖ¸¶¨µÄx×ø±êÓëy×ø±ê»æÖÆ×ÓÔªËØ¡£Èç¹ûûÓÐÖ¸¶¨×ø±ê£¬ÔòËùÓеÄ×ÓÔªËض¼»æÖÆÔÚÈÝÆ÷µÄ×óÉÏ·½¡£ÀýÈ磬Èç¹ûÔÚCanvasÖÐÌí¼ÓÒ»¸öButton¿Ø¼þ¶ø²»ÎªÆäÖ¸¶¨×ø±ê£¬ÄÇôButton¾Í±»³ÊÏÖÔÚCanvasµÄ×óÉϽǣ¬Ä¬ÈϵÄ(0,0)λÖá£
Application
ͨ¹ýʹÓÃlayoutÊôÐÔ£¬Application²¼¾ÖÄÜÉèÖóÉÀàËÆVBox¡¢HBox»òCanvasÈÝÆ÷ÖеÄÈκÎÒ»ÖÖ·½Ê½¡£
Tile
½«Æä×ÓÔªËØÅÅÁгÉÒ»¸ö»òÕ߶à¸öºáÐлòÕßÊúÁУ¬ÔÚÐèҪʱÔö¼ÓÐÂÐлòÕßÐÂÁС£ËùÓеÄTileÈÝÆ÷µ¥Ôª¸ñ´óС¶¼Ïàͬ¡£Flex½«TileÈÝÆ÷µÄµ¥Ôª¸ñÅÅÁÐÔÚÕý·½ÐÎÍø¸ñÖУ¬Ã¿Ò»¸öµ¥Ôª¸ñÄÚ·ÅÈëÒ»¸ö×ÓÔªËØ¡£²¼¾Ö·½Ê½ÓÉdirectionÊôÐÔ¾ö¶¨¡£
Pnael
BoxÈÝÆ÷µÄ×ÓÀà¡£PanelÈÝÆ÷¿ÉÒÔÏñVBox¡¢HBox»òÕßCanvasÈÝÆ÷Ö®ÖеÄÈκÎÒ»ÖÖÄÇÑù²¼¾Ö£¬ÕâÈ¡¾öÓÚÖ¸¶¨µÄlayoutÊôÐÔ£¨Ä¬ÈÏΪabsolute£¬ÓëCanvasÒ»Ñù£©¡£³ýÁË¿ÉÒÔ°üº¬×ÓÔªËØ£¬PanelÈÝÆ÷»¹ÌṩÁ˱êÌâÀ¸ÇøÓò£¬¿ÉÒÔ°üº¬ËüµÄ±êÌâºÍ״̬ÐÅÏ¢¡£
ControlBar
ControlBarÈÝÆ÷¿ÉÒÔÓÃÓÚ½«¹¤¾ßÀ¸Í£¿¿ÔÚPanelÈÝÆ÷»òÕßTitleWindowÈÝÆ÷µÄµ×²¿¡£ControlBarÈÝÆ÷ÄÜÒÔHBox»òÕßVBoxÈÝÆ÷µÄ·½Ê½²¼¾Ö£¬ÕâÈ¡¾öÓÚdirectionÊôÐÔµÄÉèÖÃÇé¿ö£¨Ä¬ÈÏΪhorizontal£¬Ë®Æ½·½Ê½²¼¾Ö£©¡£
ApplicationControlBar
ÄÜÒÔHBoxÈÝÆ÷»òÕßVBoxÈÝÆ÷µÄ·½Ê½²¼¾Ö£¬ÕâÈ¡¾öÓÚdirectionµÄÉèÖã¨Ä¬ÈÏhorizontal£©¡£ApplicationControlBarÓÃÓÚ·ÅÔÚÔÚÕû¸öÓ¦ÓÃÖж¼ÄÜ·ÃÎʵÄ×é¼þ¡£Èç¹ûApplicationControlBarÈÝÆ÷ÊÇ<mx:Application>µÄµÚÒ»¸ö×ÓÔªËØ£¬¶øÇÒdockÊôÐÔΪtrue£¬ÄÇôApplicationControlBarÈÝÆ÷»áÍ£¿¿ÔÚÓ¦ÓóÌÐò»æÖÆÇøÓòµÄ¶¥²¿£¬Õ¼ÂúÓ¦ÓóÌÐòµÄ×î´ó¿í¶È£¬¶øÇÒ²»ËæÓ¦ÓóÌÐòµÄ¹ö¶¯¶ø¹ö¶¯¡£
Ïà¹ØÎĵµ£º
Flexʼþ»úÖÆ
Flexʼþ»úÖÆÊǹ۲ìÕßģʽ£¬¼´Ê×ÏÈҪע²áʼþ£¬Ê¼þ·Ö·¢ºóͨ¹ýʼþÏìÓ¦º¯Êý½øÐд¦Àí¡£
ÀýÈçÔÚAS3ÖУº
button.addEventListener(“click”,onClick);//Ïòbutton×¢²áÒ»¸öclickʼþ
internal function onClick(evt:MouseEvent):void{txt.text=“click a button!”;}//ʼþÏìÓ¦º¯Êý
ÄÇÃ ......
ÏÖÔÚÎÒÃÇÏÈ¿´¿´´úÂë,ÏÂÃæµÄ´úÂë×°ÔÚcreationCompleteʼþÖе÷ÓÃinit()À´Æô¶¯È«ÆÁ.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="init()"
>
<mx:Scri ......
<?xml version="1.0" encoding="utf-8"?>
<s:Application name="Spark_NumericStepper_textInput_editable_test"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xml ......
×î½ü×öÓÎÏ·µÄʱºò£¬·¢ÏÖÍ˳öµÇ½ʱURLÉÏ»á×Ô¶¯¼ÓÉÏÒ»¸ö“#”×Ö·û£¬ºÜÆæ¹Ö£¬Google+BaiduÎÞÊý´Î¶¼Ã»ÓÐÕÒµ½´ð°¸¡£½ñÌìÎÞÒâ¼ä¿´µ½¼¸¸ö
ȺÓÑÔÚ˵ͨ¹ý“BrowserManager”»ñÈ¡URL£¬ÓÚÊÇ×Ðϸ²é¿´ÁËAPI£¬ÓÖ·¢ÏÖÁË“HistoryManager”£¬Õâ¸öÎÊÌâÖÕÓÚÃ÷°×ÁË¡£
ÎÒÃÇͨ³£¿´µÄWebÒ³Ãæ
¿ÉÒÔͨ¹ýä¯ÀÀÆ÷µ ......
Flex ÖпÉÄܵ¼ÖÂÄÚ´æй¶µÄµØ·½
ÊÕ¼¯Á˲»ÉٵĻᵼÖÂÄÚ´æ鶵ÄÇé¿ö£º
ʼþ¼àÌý£º
¶Ô¸¸¼¶¶ÔÏó¼ÓÁ˼àÌýº¯Êý£¬»áÔì³ÉÄÚ´æй¶£¬Àý£º
override protected function mouseDownHandler(…):void
{
systemManager.addEventListener(“mouseUp”, mouseUpHandler);
......
½â¾ö£º
ÔÚÏú»Ù¶ÔÏóµÄʱºò£ ......