FLEX:Bindable±êÇ©
[Bindable]¾ÍÊÇËùνµÄÔªÊý¾Ý±êÇ©¡£ÔªÊý¾Ý±êÇ©ÊÇÒ»ÖÖÌØÊâµÄ±êÇ©£¬ËüÔÚ´úÂëÖеÄ×÷ÓþÍÊÇÏò±àÒëÆ÷ÌṩÈçºÎ±àÒë³ÌÐòµÄÐÅÏ¢¡£Êµ¼ÊÉÏ£¬ÕâЩ±êÇ©²¢Ã»Óб»±àÒëµ½Éú³ÉµÄSWFÎļþÖУ¬¶øÖ»ÊǸæËß±àÒëÆ÷ÈçºÎÉú³ÉSWFÎļþ¡£
[Bindable]
BindableÔªÊý¾Ý±êÇ©ÊÇ×î¾³£Óõ½µÄÒ»¸öÔªÊý¾Ý±êÇ©£¬ÒòΪËüʹ³ÌÐò×é¼þÖ®¼äµÄÊý¾Ýͬ²½±äµÃºÜÈÝÒס£Bindable¿ÉÒÔÓÃÀ´°ó¶¨¼òµ¥Êý¾ÝÀàÐÍ¡¢Àà¡¢¸´ÔÓÊý¾ÝÀàÐÍÒÔ¼°º¯Êý¡£°ó¶¨Êý¾ÝµÄʱºò£¬Äã±ØÐëÏÈʹÓÃÔªÊý¾Ý±êÇ©¶¨ÒåÒ»ÏÂÊý¾Ý£¬
BindableÒ²¿ÉÒÔÓÃÀ´°ó¶¨µ½Ê¼þ¡£Listing 2չʾÁËÈçºÎʹÓÃgetterºÍsetterº¯Êý½«Ò»¸öÊôÐ԰󶨵½Ò»¸öʼþÉÏ¡£Õâ¸öÀý×ÓÖÐÓÐÒ»¸ö½Ð×öphoneNumberµÄ˽ÓбäÁ¿£¬»¹ÓÐÒ»¸ö¹«ÓÐµÄ setterºÍgetterº¯Êý¡£Ê¹ÓÃBindable±êÇ©½«Õâ¸ögetter·½·¨°ó¶¨µ½ÁËÒ»¸ö½Ð×öphoneNumberChangedµÄʼþÉÏ£¬Ö»Òª Êý¾Ý·¢Éú¸Ä±äsetter·½·¨¾Í»á·ÖÅÉphoneNumberChangedʼþ¡£Í¨¹ýʹÓÃsetter·½·¨£¬¿ÉÒÔÔÚÊý¾Ý¸³Óè˽ÓбäÁ¿Ö®Ç°¶ÔÆä½øÐвÙ×÷¡£ ÔÚÕâ¸öÀý×ÓÖУ¬Êý¾ÝÖ»ÓÐÔÚ³¤¶È´óÓÚµÈÓÚ10µÄʱºò²Å»á±»¸ñʽ»¯¡£µ±phoneNumberChangedʼþ±»·ÖÅɵÄʱºò£¬µÚ¶þ¸öTextInput×é¼þ »á±»¸üУ¬ÒòΪËûµÄtextÊôÐ԰󶨵½ÁËphoneNumber±äÁ¿ÉÏ¡£
µ±Ò»¸öÊôÐÔÀ´×ÔÒ»¸öÊý¾Ý±í´ïʽ£¬µ±Ô´ÊôÐԸıäʱ£¬Flex×Ô¶¯¸´ÖÆÔ´ÊôÐÔµÄÖµµ½ÈκÎÄ¿±êÊôÐÔ¡£ÎªÁ˱êʾ×ÅÒ»¸´ÖÆ£¬Äã±ØÐëʹÓÃ[Bindable]ÔªÊý¾Ý±êÇ©ÔÚflexÖÐ×¢²áÕâÒ»ÊôÐÔ£¬²¢ÇÒÔ´ÊôÐÔ±ØÐë·¢ËÍÒ»¸öʼþ¡£
[Bindable]ÔªÊý¾Ý±êÇ©²ÉÓÃÒÔϸñʽ
[Bindable]
[Bindable(event="eventname")]
Èç¹ûÄãÊ¡ÂÔÁËʼþÃû£¬flex×Ô¶¯´´½¨Ò»¸öʼþÃûpropertyChange
Äã¿ÉÒÔÔÚÈý¸öµØ·½Ê¹ÓÃ[Bindable]ÔªÊý¾Ý±êÇ©
1¡¢ÔÚpublic class¶¨ÒåÇ°
[Bindable]ÔªÊý¾Ý±êÇ©°ó¶¨ËùÓеÄ×÷Ϊ±äÁ¿¶¨ÒåµÄpublicÊôÐÔ£¬²¢ÇÒËùÓеÄpublicÊôÐÔ¶¼¶¨ÒåÓÐgetterºÍsetter·½·¨¡£ÔÚÕâÖÖÇé¿öÏ£¬[Bindable]ûÓвÎÊý£¬ÀýÈ磺
[Bindable]
public class TextAreaFontControl extends TextArea {}
flex±àÒëÆ÷×Ô¶¯´´½¨Ò»¸öʼþÃû½ÐpropertyChangeÓÃÓÚËùÓеĹ«ÓÐÊôÐÔ£¬ÕâЩÊôÐÔ¿ÉÒÔ×÷Ϊ°ó¶¨±í´ïʽµÄÔ´¡£ÕâÖÖ¶¨ÒåµÈͬÓÚ
[Bindable(event="propertyChange")]
Èç¹ûÊôÐÔÖµµÄ¸Ä±äÓëÔÀ´Ïàͬ£¬flex²¢²»´«µÝÕâ¸öʼþ»ò¸üÐÂÊôÐÔ¡£
2¡¢ÔÚpublic, protected »ò private ÊôÐÔÇ°£¬¸ñʽΪ£º
[Bindable]
public var foo;
3¡¢Before a public, protected, or private property defined by a getter or setter method.
Äã±ØÐëͬʱ¶¨ÒågetterºÍsetter·½·¨£¬ÒÔ±ãÓÚʹÓÃ[Bi
Ïà¹ØÎĵµ£º
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Zoom effect. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
">
<mx:Style source="style/style.css"/>
<mx:Scri ......
ÉÏ´Î˵ÁËÖ±½Ó°Ñ×ÖÌåǶÈëµ½flex³ÌÐòÖеķ½·¨£¬Õâ´ÎдһϽ«×ÖÌå±àÒë³Éswfºó¹©ÆäËüflex³ÌÐò¼ÓÔØÀ´µ÷Óõķ½·¨¡£
Ê×ÏÈ£¬Ð½¨Ò»¸öactionscriptµÄproject£¬È¡ÃûΪFlexFont£¬½«×ÖÌåÎļþ·Åµ½src/fontĿ¼Ï£¬Ö÷³ÌÐòΪ
FlexFont.asÎļþ£¬ÄÚÈÝÈçÏ£º
package {
import flash.display.Sprite;
public class FlexFont extend ......
flex builder ÉèÖ÷ÇϵͳĬÈÏ×ÖÌ壺
´æÔÚÎÊÌ⣺text²»ÄÜÉèÖÃbold£¬·ñÔò²»Æð×÷Óá£
·½·¨Ò»£º£¨css£©
<mx:Style>
@font-face
{
font-family: myFont;
& ......
Æäʵ¶ÔÓÚÕâ¸öÌâÄ¿ÊDz»Ç¡µ±µÄ£¬ÒòΪflexÖÐÊÇûÓÐÒ³ÃæÕâ¸ö¸ÅÄîµÄ£¬Ò³ÃæÔÚflexÀïÃæÆäʵ¾ÍÊÇÒ»¸ö¸öµÄCanvas£¬vbox£¬
hboxµÈµÈÖ®ÀàµÄ¶«Î÷£¬¿´µ½µÄ²»Í¬Ò³ÃæµÄÇл»£¬¾ÍÊÇÕâЩԪËØÒ»²ã²ãµÄ¶Ñ»ý£¬»òÕßÌæ»»£¬µ«ÊÇΪÁ˺ÃÀí½â£¬»¹ÊdzÆ֮Ϊ
"Ò³ÃæÌøת"¡£ÆäʵÎÒÃÇ¿ÉÒԶԱȴ«Í³µÄC/S¿ª·¢Ä£Ê½£¬Ã»Ò³ÃæÌøת£¬Ö»Óд°ÌåºÍÔª¼þµÄÏÔʾºÍÒ ......