《Hello Flex 4》笔记——4 Spark containers, view stat...

SESSION 16  Spark containers and layouts

了解,需要用再看

《Hello Flex 4》笔记——4 Spark containers, view stat..._第1张图片


Layouts and containers are decoupled in Spark, meaning you can write your own layouts to be used with any Spark container. 
DataGroup and SkinnableDataContainer have a dataProvider property you can set.

SESSION 17  View states(比较有用)

内容包括自定义组件,和View states

根据源代码修改添加一个states和一个组件来学习

《Hello Flex 4》笔记——4 Spark containers, view stat..._第2张图片


View states are an easy way of making a Flex 4 application dynamic.
Components can be resized, included, and excluded based on which view state they’re in.
To simplify the logic of including and excluding view states, states can be grouped into stateGroups. 
If you want to see some more examples of view states (both more basic and more advanced than this), see the view states chapter of the Using Flex 4 PDF at http://livedocs.adobe.com/flex/gumbo/ flex_4_usingsdk.pdf.

SESSION 18  Effects and animation

Effects in Adobe Flex 4 beta—Part 1: Basic effects (www.adobe.com/devnet/flex/articles/flex4_effects_pt1_print.html) 
Effects in Adobe Flex 4 beta—Part 2: Advanced graphical effects (www.adobe.com/devnet/flex/articles/flex4_effects_pt2_print.html)


Effects are nonvisual elements so they're added to an fx:Declarations element. 
Effects can be run in parallel using Parallel or sequenced using Sequence .

SESSION 19  CSS styling

两种方式

<fx:Style>
  @namespace s "library://ns.adobe.com/flex/spark";  
  @namespace mx "library://ns.adobe.com/flex/halo";
  s|Panel {
    color: #FF0000;                       
  }
  mx|Button {
    padding-left: 20;           
  }
</fx:Style>
<fx:Style source="styles.css"/>
Styles can be specified inline inside an fx:Style block or in external CSS files referenced by an fx:Style block. The effects of these style blocks are cumulative.

SESSION 20  Peeking behind the MXML curtain

Right-click on the session20 project and choose Properties. Then, choose the Flex Compiler option, and add -keep to the additonal compiler arguments

.mxml文件会编译成.as文件

SESSION 21  The Spark component lifecycle



We see that preinitialize happens before the Button and the TextArea are added to the app, and that the initialize , creationComplete , and applicationComplete events then take place.
这章没认真看,比较无聊~知识点挺多就是了


你可能感兴趣的:(Flex)