Flex creationPolicy²ßÂÔ
ÔÚFlexÖУ¬ÀûÓÃstate½øÐÐ״̬ºÍÒ³ÃæµÄǨÒÆÓë±ä»»£¬ÖмäµÄAddChild IOverrideÓÐÒ»¸öcreationPolicy£¬Õâ¸öÊôÐÔÓÐÈýÖÖÉèÖ㬷ֱðÈçÏ£º
AUTO£ºÄ¬ÈÏÉèÖã¬Ö»ÓÐÔÚ״̬¸Ä±äµÄʱºò£¬¼´Ê±µÄÉú³ÉÐÂÔö×é¼þ£»
ALL£ºÔÚApplication¼ÓÔصÄʱºò£¬¾Í¼ÓÔØÁËÐÂÔöµÄ×é¼þ£¬ÔÚ״̬¸Ä±äµÄʱºòÏÔʾ£»
NONE£ºÐèÒªÊÖ¶¯µÄµ÷ÓøÃaddChild Instance createInstance·½·¨Éú³ÉÐÂÔö×é¼þ£¬·½ÄÜÏÔʾ£»
ʾÀý´úÂëÈçÏ£º
<?xml version="1.0"?>
<!-- states\StatesCreationPolicy.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initButton();">
<mx:Script>
<!--[CDATA[
// Because the cpAll view state creates the Button control
// at application startup, you can access the control to
// set the label before the first switch
// to the cpAll view state.
public function initButton():void {
newButton.label="cpAll Button";
}
]]-->
</mx:Script>
<mx:states>
<!-- Create the Button control at application startup. -->
<mx:State name="cpAll">
<mx:AddChild relativeTo="{myPanel}" creationPolicy="all">
<mx:Button id="newButton"/>
</mx:AddChild>
</mx:State>
<!-- Create the Button control when you want to create it. -->
<mx:State name="cpNone">
<mx:AddChild id="noCP"
relativeTo="{myPanel}" creationPolicy="none">
<mx:Button label="cpNone button"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Panel id="myPanel"
title="Static and dynamic states"
width="300" height="150">
<!-- Change to the cpAll view state. -->
<mx:Button label="Change to cpAll state"
click="currentState
Ïà¹ØÎĵµ£º
Glow£º
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Glow effect. -->
<!--
ÈçºÎʹÓÃFlex Glow Effect
&n ......
metadata×îÏÈ¿ªÊ¼ÓÚdotnet°É£¬½Ð×öAttribute£»È»ºójavaÒ²½ôËæÆäºó£¬½Ð×öAnnotaion£»actionscriptÔò½Ð×öMetadata¡£ÆäÖÐdotnetÓëActionScriptµÄÓï·¨¸ñʽÉ϶¼ÊÇÏàËƵģ¬ÈçASÖеÄ[Bindable]¡£ÔÚJavaÖÐÔòÊÇÓÃ@XXXÕâÑùµÄÓï·¨£¬Èç@override¡£²»¹ýÄ¿µÄ¶¼ÊÇÒ»¸ö£¬¸øÀà»ò·½·¨»òÊôÐÔÔö¼Ómeta data±ê¼Ç£¬´Ó¶øʵÏÖ¶ÔÕâЩ±»±ê¼ÇµÄ´úÂë½øÐÐ ......
Flex¿ª·¢ÕßÐèÒªÖªµÀµÄ10¼þÊÂ
×÷Õß ÕÅÁú ·¢²¼ÓÚ 2010Äê2ÔÂ18ÈÕ ÉÏÎç1ʱ25·Ö
ÉçÇø Java Ö÷Ìâ ¸»¿Í»§¶Ë/×ÀÃæ ±êÇ© Flex, Flash
²»¾ÃÇ°£¬Michael Portuesi·¢±íÁËһƪ²©ÎÄ£¬Ì¸µ½ÁËFlex¿ª·¢ÕßÐèÒªÖªµÀµÄ10¼þÊ¡£ÎÄÕ½éÉÜÁËÿ¸ö½øÈëFlexÁìÓòµÄ¿ª·¢Õ߶¼ÐèÒªÕÆÎյĻù±¾ÖªÊ¶Óë¼¼ÄÜ¡£
Michael Portuesi¸ø³öµÄ10¸öÌõÄ¿ÖУ¬ÓÐЩÊÇ¿ ......
1 °²×°Adobe AIR ÔËÐÐʱ£¬ºÍjavaµÄJVMÀàËÆ¡£
Adobe AIR ÔËÐÐʱÔÊÐíÔÚ×ÀÃæÔËÐÐAIRÓ¦ÓóÌÐò£¬ÍÑÀëÓÎÀÀÆ÷µÄÊø¸¿¡£
ÏÂÔØ°²×°Îļþhttp://labs.adobe.com/downloads/air.html
ÔÚÏÂÔØÒ³ÃæÓÐÑùÀý³ÌÐò£¨Sample Applications£©http://labs.adobe.com/technologies/air/samples/
2 °²×°¿ª·¢»·¾³
µ±È»ÎÒÃÇÑ¡Ôñ¿ª·¢Ð§ÂÊ×î¸ßµÄFlex B ......
¹ýÈ¥ÔÚ¶ÔDataGridÉèÖÃÐб³¾°É«Ê±£¬¸Ð¾õ»¹ÊÇͦ·½±ãµÄ£¬Ö»ÒªÖØдDataGridµÄ£¬ÈçÏÂ
private var _rowColorFunction:Function;
public function set rowColorFunction(f:Function):void
{
this._rowColorFunction = f;
}
public function get rowColorFunction():Func ......