Flex 4 betaÖеÄÊӿں͹ö¶¯¹¦ÄܽéÉÜ
Flex 4
betaÌṩÁ˽ӿÚIViewport£¨±»ËùÓпɹö¶¯×é¼þʵÏÖ£©ºÍ×é¼þScroller£¨ÎªÊÓ¿ÚÌí¼Ó¹ö¶¯Ìõ£¬ÊµÏÖ½»»¥Ê±µÄ¹¦Äܹ¦ÄÜ£©¡£ÕâÀïËùνÊÓ¿Ú£¨viewport£©£¬¼´¿É¹ö¶¯×é¼þ£¬ÒªÊµÏÖIViewport½Ó¿Ú¡£½»»¥Ê½¹ö¶¯£¬ÊÇËùÓÐͼÐÎÓû§½çÃ棨GUI£©¹¤¾ßµÄ»ù±¾ÌØÐÔÖ®Ò»¡£Flex
4 betaÖ®ËùÒÔ²ÉÓÃÕâÖÖ·½·¨£¬ÊÇΪÁ˱ÈFlex 3µÄʵÏÖ¸üÓÐЧÂÊ£¬¾ßÌåÇë²ÎÔÄComparison
with MX scrolling
¡£
ÔÚListºÍTextAreaµÈºÜ¶àFlex×é¼þÖУ¬ScrollerºÍÊÓ¿Ú¾ùÊÇËüÃÇƤ·ôµÄÒ»¸ö×é³É²¿·Ö£¬ÎÞÐ迪·¢Õß¿¼ÂÇÈçºÎʵÏÖ¹ö¶¯¹¦ÄÜ¡£±¾ÎĽ«½éÉÜIViewport½Ó¿ÚµÄ¹¤×÷ÔÀí£¬²¢Ìṩһ¸ö¼òµ¥µÄScrollerÀý×Ó¡£Èç¹ûÄãÏëÖªµÀÈçºÎ´´½¨×Ô¼ºµÄ½»»¥Ê½¹ö¶¯×é¼þ£¬»òÐèÉîÈëÀí½âFlex
4Öйö¶¯ÌØÐԵŤ×÷ÔÀí£¬ÇëÔĶÁ±¾ÎÄ¡£
񻂗
ΪÁ˸üºÃÀí½â±¾ÎĵÄÄÚÈÝ£¬ÄãÐè×¼±¸ÈçÏÂÈí¼þºÍÎļþ£º
Flash Builder 4 beta
ÏÂÔØ£¨InfoQÖÐÎÄÕ¾¶À¼Ò¸ßËÙÏÂÔØ£©
ÉîÈëѧϰ
ʾÀýÎļþ£º
flex4_viewport_scrolling.mxml
(MXML, 2 KB)
Ô¤±¸ÖªÊ¶
ÊìϤActionScript¡¢Flex3ºÍ»ù±¾µÄ2DͼÐθÅÄ½«ÓÐÀûÓÚÀí½â±¾ÎÄÄÚÈÝ¡£
¹ö¶¯ÓëÊÓ¿Ú¸ÅÊö
GUIͨ¹ý¹ö¶¯£¬¿ÉÒÔÏÔʾ±ÈÓû§ÆÁÄ»¿Õ¼ä¸ü´óµÄÎĵµ¡£
ÔÚSpark£¨Flex 4 betaÐÂÔöµÄ×é¼þºÍƤ·ô¼Ü¹¹£©ÖУ¬IViewport½Ó¿Ú¶¨ÒåÁËÓÃÒ»¸ö¾ØÐÎС²Ã¼ô´°¿Ú£¨clipping
window£©Ã¿´Î¹ö¶¯Ò»¶¨¾àÀë¡¢Öð²½Õ¹Ê¾´óÎĵµµÄ¾ßÌåÐÐΪ¡£ÕâÀïËù˵“¹ö¶¯”£¬ÊÇÖ¸¸Ä±äÓë´óÎĵµ¹ØÁªµÄ²Ã¼ô´°¿ÚµÄλÖá£
SparkÖеÄScroller×é¼þΪ½»»¥Ê½¹ö¶¯ÊÓ¿ÚÌṩÁËÒ»¸öͨÓõÄGUI¡£ËüÏÔʾһ¶Ô·Ö±ð³Ê×ÝÏòºÍºáÏòµÄ¹ö¶¯Ìõ£¬Æä¹ö¶¯ÌõµÄ»¬¿éλÖö¨ÒåÁ˲üô´°¿ÚµÄλÖÃ(X,Y)¡£È±Ê¡Çé¿öÏ£¬¹ö¶¯Ìõ½öÔÚÐèҪʱ²ÅÏÔʾ¡£Í¼1½âÊÍÁËIViewport½Ó¿ÚµÄÏà¹ØÊôÐÔ£¨width¡¢height¡¢contentWidth¡¢contentHeight¡¢horizontalScrollPositionºÍverticalScrollPosition£©¼°Æ伸ºÎ½á¹¹¡£
ͼ1
£¬IViewportµÄ¼¸ºÎ½á¹¹ºÍÏà¹ØÊôÐÔ
ÊÓ¿ÚµÄcontentWidthºÍcontentHeightÊôÐÔ£¬¶¨ÒåÁËÊÓ¿ÚÖÐÄÚÈݱ»»æÖÆʱµÄºáÏòºÍ×ÝÏò×î´ó³ß´ç¡£widthºÍheightÊôÐÔ¶¨ÒåÊÓ¿ÚÖв¿·ÖÄÚÈݵijߴ磬¼´ÔÚÆÁÄ»ÉϳöÏÖµÄÄÚÈݵijߴ磬»ò˵ÊӿڵIJüô¾ØÐδ°¿ÚµÄ´óС¡£horizontalScrollPositionºÍverticalScrollPositionÊôÐÔÔò±íʾÉÏÊö²Ã¼ô´°¿ÚµÄλÖá£Í¨¹ý¸Ä±äÕâЩÊôÐÔ£¬Ó¦ÓóÌÐò¿ÉÒÔʵÏÖÊӿڵĹö¶¯¡£
ScrollerÀà
SparkµÄScrollerÀàÊÇÒ»¸öÄÚÖÃÊÓ¿ÚµÄÈÝÆ÷£¬ºÍGroupºÍDataGroup×é¼þÏà·Â¡£
ScrollerÄÜÏÔʾ×ÝÏòºÍºáÏò¹ö¶¯Ìõ£¬Æä¹ö¶¯Î»ÖÃÓÉÊÓ¿ÚµÄhorizontalScrollPositionºÍverticalScroll
Ïà¹ØÎĵµ£º
<?xml version="1.0"?>
<!-- charts/StandardEffectTriggers.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
import mx ......
ÍøÂç×´¿öÊÇ»¥ÁªÍø·¢Õ¹ÓëÈí¼þ·¢Õ¹µÄÒ»¸öºÜ´óµÄÆ¿¾±£¬Èç¹ûÄÄÌì·ÃÎÊÍøÉÏ×ÊÔ´ÄÜÏó·ÃÎʱ¾µØÓ²ÅÌ£¬»òÕßÄÜÏó·ÃÎÊÄÚ´æÄÇÑù¿ì£¬ÄÇÑùÔÛÃǵļÆËã»úÒÔºóÖ»ÐèÒªÊäÈëÊä³öÉ豸ÒÔ¼°ÍøÂçÉ豸¾Í¿ÉÒÔÁË£¬¹þ¹þ£¬ÕâÖ»ÊÇÒ»¸öÃÀºÃµÄÔ¸Íû¡£
FlexÓ¦ÓÃÔÚWeb¿ª·¢ÉÏ£¬±ÜÃâ²»ÁËÍøÂçÎÊÌ⣠......
http://www.zhuoqun.net/html/y2008/1042.html¼ÓÔØͼƬ
http://www.millionclouds.com/ä¯ÀÀͼƬ
http://www.scion.com/#homeÂô³µ
http://labs.newmediateam.com/pizzastore/customerview/ÂôÅûÈø
http://www.sumo.fi/flash/sumopaint/ÏßͼƬ±à¼Æ÷
http://www.prettyloaded.com/¸÷ÖÖÔ¤¼ÓÔØЧ¹û
http://www.adobecards. ......