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
Ïà¹ØÎĵµ£º
Flex
4 SDKÔ´ÂëdzÎö£¡
Èç´ó¼ÒҪתÔØ£¬Çë±£Áô±¾È˵İæȨ:
/*
*Description:PV3DÀà¼Ì³ÐÌåϵ½á¹¹
*Auther:³ç³ç-ÌìÕæµÄºÃÀ¶°¡
*MSN:chongchong2008@msn.com
*Blog:chongchong2008
*Dates:2009-06-02
*Copyright:ChongChong2008
YiChang HuBei China
*/
Flex 4 SDKÔ´ÂëdzÎö£¡
×î½üÏÂÁËFlex 4 SDK £¨flex_sd ......
<?xml version="1.0"?>
<!-- charts/MemoryGraph.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="initTimer()">
<mx:Script>
<!--[CDATA[
import flash.utils.Timer;
import flash.events.TimerEve ......
1.ÏÂÔØ°²×°netbeans6£¨Îҵİ汾ÊÇ6.7.1£©
2.ÏÂÔØFlex Sdk 3 £¬½«Æä½âѹµ½Ö¸¶¨µÄÒ»¸öĿ¼¡£http://www.adobe.com/cfusion/search/index.cfm?loc=en_us&term=flex+sdk&siteSection=cfusion%3Atdrc
3.ÏÂÔØnetbeansµÄflex²å¼þ http://sourceforge.net/projects/flexbean/files/
4.netbeansÅäÖÃFlex²å¼þ£¬ÅäÖÃ³É ......
MyEclipse
FlexµÄÅäÖÃÖ®³õÎÒÃÇ¿´¿´ÔµÓÉ£ºÒ»¿ªÊ¼Ñ§Ï°Ê¹ÓÃFlexµÄʱºò,ÎÒÊÇÓõĵ¥¶ÀµÄFlexBuilder3,×öЩ´¿FlexµÄÓ¦ÓóÌÐò»¹¿ÉÒÔ.µ«ÊÇÈç¹ûÒª
ºÍJava½áºÏÔÚÒ»ÆðʹÓÃ,¼´ÀûÓÃFLEX³äµ±Ò»¸öÍêÕûµÄJ2EEϵͳµÄWEB²ãµÄ»°,ÄÇôµ¥¶ÀʹÓÃFlexBuilder3ºÍMYECLIPSEÊǺܲ»
·½±ãµÄ,´ó´óÓ°ÏìÁË¿ª·¢Ð§ÂÊ,Òò´Ë×öÁËÏÂMyEclipse+FlexµÄÅäÖÃ,´ïµ½Ö ......