??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品亚洲二区在线,在线观看免费亚洲,亚洲va在线va天堂va888wwwhttp://www.tkk7.com/usherlight/category/7457.html天^׃白云泉,云自无心水自闌Ӏ何必奔冲山下去Q更LL向人间Q?/description>zh-cnTue, 26 Feb 2008 23:16:51 GMTTue, 26 Feb 2008 23:16:51 GMT60Adobe Flex3正式发布?/title><link>http://www.tkk7.com/usherlight/archive/2008/02/27/182349.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Tue, 26 Feb 2008 22:52:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2008/02/27/182349.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/182349.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2008/02/27/182349.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/182349.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/182349.html</trackback:ping><description><![CDATA[2008q??4日,Flex3正式发布了。分为标准版和Professional版?br /> 两者差别不大,标准版没有advanced datagrid和一些性能分析工具。(advanced datagridQ可是我期盼好久的功能了?br /> <br /> 另外Qh׃是相当的不菲。Standard is $249 US, Professional costs $699.<br /> 此外Q还可以选择从flex2升上去Q升U到Standard的话Q?9元Q升U到professional?99元?br /><img src ="http://www.tkk7.com/usherlight/aggbug/182349.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2008-02-27 06:52 <a href="http://www.tkk7.com/usherlight/archive/2008/02/27/182349.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ViewStack的大问?/title><link>http://www.tkk7.com/usherlight/archive/2007/08/24/139173.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Fri, 24 Aug 2007 12:26:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/08/24/139173.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/139173.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/08/24/139173.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/139173.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/139173.html</trackback:ping><description><![CDATA[<p>Q?br>ViewStack的大是由其子组件的大小军_的,而ViewStackq不会在改变zd子组件的时候自动resize?br>只有使用以下Ҏ来控制ViewStack的大?br>1. 使用相同的固定值明指定所有子lg的大?br>2. 使用相同的比例值指定所有子lg的大?br>3. ViewStack的width和height的D|ؓ一个固定或者倹{?/p> <p>上述3U方法是Adobe官方文档提供的。但是这3U方法不能解决ViewStack子组件大不一_ViewStack不能自动调整的问题?br>我最后是使用ActionScript动态解决的?br>在更换ViewStack的active child之间Q首先设|viewStack的大?/p> <p><mx:ViewStack id="appStack"><br>        <mx:VBox id="v1"/><br>        <mx:VBox id="v2"/><br></mx:ViewStack></p> <p>public function changeChild() : void {<br>        appStack.width = 200;<br>        appStack.height = 200;<br>        appStack.selectChild = v1;<br>}<br><br>我错了,使用ViewStack的resizeToContent是最好的解决办法?/p><img src ="http://www.tkk7.com/usherlight/aggbug/139173.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-08-24 20:26 <a href="http://www.tkk7.com/usherlight/archive/2007/08/24/139173.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>amfphp 1.9 beta 介绍http://www.tkk7.com/usherlight/archive/2007/04/21/112449.html云自无心水自?/dc:creator>云自无心水自?/author>Sat, 21 Apr 2007 08:06:00 GMThttp://www.tkk7.com/usherlight/archive/2007/04/21/112449.htmlhttp://www.tkk7.com/usherlight/comments/112449.htmlhttp://www.tkk7.com/usherlight/archive/2007/04/21/112449.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/112449.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/112449.html 

新特?br>1. 支持AMF3, q一Ҏ疑是Ȁ动h心的.
2. 支持JSON, 除了gateway.php? 增加了json.php, 让你的服务能够用JSON.
有两个例?
http://5etdemi.com/amfphp2/samples/ajaxtables/
http://5etdemi.com/amfphp2/samples/spry/
3. 一个新的service browser
4. 在php? 不再需要写 $this->methodTable q个东东? 在amfphp 1.9 ?所有的Ҏ默认为可以远E访问,除非Ҏ名是以下划线开?或?Ҏ?private 的(只有 php5 支持Q??/p>

 



]]>
Flex应用启动背后的故?/title><link>http://www.tkk7.com/usherlight/archive/2007/04/17/111365.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Tue, 17 Apr 2007 09:47:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/04/17/111365.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/111365.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/04/17/111365.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/111365.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/111365.html</trackback:ping><description><![CDATA[<p>首先介绍一下SystemManager. SystemManager是Flex应用的主控? 它控制着应用H口, Application实例, 弹出H口, cursors, q管理着ApplicationDomain中的c? SystemManager是FlashPlayer实例化的W一个类, 它存储了d用窗口的大小和位|信? 保存其子lg比如:动弹出H口和模态窗口的痕迹. 通过SystemManager可以获得内嵌字体,样式和document对象. <br>自定义的可视化组?UIComponent的子c?只有在调用过addChild()? 才会有一个SystemManager赋给他们, 之前是Null. 所以在自定义可视化lg的构造函C不要使用SystemManager.</p> <p>通常, Application对象创徏? 发生如下事g:<br>1. 实例化Application对象<br>2. 初始化Application.systemManager<br>3. Application在初始化q程之前, z֏预初始化事g.<br>4. 调用createChild(). 此时, 所有应用组件被创徏, 所有组件的createChild()被调?<br>5. Applicationz֏初始化事? 表明所有的lg初始化完?<br>6. z֏creationComplete事g<br>7. Application对象d到显C列表中<br>8. z֏applicationComplete事g</p> <p>大多数情况下, 我们使用<mx:Application>来创建application对象, 但如果用ActionScript来创建的? 那么不要在application的构造函C创徏lg, 推荐在crateChildren函数? 主要是从性能斚w考虑.<br><br>Flash包含的是一个时间线上的多个? 而Flex的SWF只包?个. SystemManager, Preloader, DownloadProgressBar和少量工L都在W一? 剩下的包括应用代? 内嵌资源全都在第二? 当Flash Player下蝲下蝲SWF? 只要接收到第一帧内_的数? ׃实例化SystemManager, 由它来创建Preloader, 然后创徏DownloadProgressBar, q两个对象会察看剩余字节的传输过E? 当第一帧的所有字节传输完毕后, SystemManager发送enterFrame到第二, 然后是其他事? 最后Application对象z֏applicationComplete事g.<br></p><img src ="http://www.tkk7.com/usherlight/aggbug/111365.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-04-17 17:47 <a href="http://www.tkk7.com/usherlight/archive/2007/04/17/111365.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Flex中一个动态修改Tree节点标签的例?/title><link>http://www.tkk7.com/usherlight/archive/2007/04/15/110820.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Sun, 15 Apr 2007 12:50:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/04/15/110820.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/110820.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/04/15/110820.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/110820.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/110820.html</trackback:ping><description><![CDATA[<p>一个动态修改Tree节点标签的例?br></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #000000"><?</span><span style="COLOR: #000000">xml version</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">1.0</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> encoding</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">utf-8</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">?></span><span style="COLOR: #000000"><br></span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:Application xmlns:mx</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">http://www.adobe.com/2006/mxml</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> layout</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">vertical</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">  horizontalAlign</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">left</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br>    creationComplete</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">initApp()</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:Script</span><span style="COLOR: #000000">><!</span><span style="COLOR: #000000">[CDATA[<br>  [Bindable]</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> var _xmlData:XML;<br>  [Bindable]</span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000"> var _xmlCur:XML;<br> <br>  </span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000"> function initApp():</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"><br>  {<br>    </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">set the test data</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">    _xmlData </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"><br>      </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">node label</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Mail Box</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>        </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">node label</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Inbox</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>        </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">node label</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Deleted mail</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>        </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">node label</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Personal</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>        </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">node label</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Professional</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>        </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">node label</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Spam</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>        </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">node label</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Sent</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>      </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">                                             <br><br>    myTree.selectedItem </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> myTree.dataProvider[</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">];        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">select the first node</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">    callLater(expandTreeNode, [myTree.selectedItem]);    </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">use callLater to expand that node</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">  }</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">initApp</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000"> <br>  </span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000"> function expandTreeNode(myXMLNode:XML):</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">{<br>    myTree.expandChildrenOf(myXMLNode,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">);              </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">expand the node</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">    _xmlCur </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> XML(myTree.selectedItem);                   </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">set the bindable variable</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">  }<br> <br>  </span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000"> function oChangeTree(oEvent:Event):</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"><br>  {<br>    _xmlCur </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> XML(oEvent.target.selectedItem);            </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">set the bindable variable</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">  }</span><span style="COLOR: #008000">//<br></span><span style="COLOR: #000000"> <br>  </span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000"> function updateNode(oEvent:Event):</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"><br>  {<br>    var xmlSelected:XML </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> XML(myTree.selectedItem)        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">get a reference to the selected node</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">    xmlSelected.@label </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> tiLabel.text;                    </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">set the label attribute</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">  }</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">updateNode</span><span style="COLOR: #008000"><br></span><span style="COLOR: #000000">   <br>    <br>]]</span><span style="COLOR: #000000">></</span><span style="COLOR: #000000">mx:Script</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> <br>  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:Label text</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Update selected Node label</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:TextInput id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">tiLabel</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> text</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">{_xmlCur.@label}</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> change</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">updateNode(event)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:HBox</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:Tree id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">myTree</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> width</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">200</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> height</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">200</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> labelField</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">@label</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br>        showRoot</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">true</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br>        dataProvider</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">{_xmlData}</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br>        change</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">oChangeTree(event)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br> </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:DataGrid id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">dg</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> dataProvider</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">{_xmlData.node}</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">  </span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:columns</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>      </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:Array</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>        </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:DataGridColumn headerText</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Name</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> dataField</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">@label</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">  </span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>       </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">mx:Array</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>    </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">mx:columns</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">mx:DataGrid</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">mx:Label text</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">{_xmlCur.@label}</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">mx:HBox</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br>      <br></span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">mx:Application</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br></span></div> <p><br><br></p> <p>应用中主要包?个组? 一个TextInput, 一个Tree, 一个DataGrid, 一个Label<br>1. 先看Tree, Tree使用_xmlData作ؓ数据? 定义一个change事g处理函数, 当前节点存储到_xmlCur变量?<br>2. TextInput的数据源是_xmlCur的label属? 也就是Tree当前节点的标{? 他也定义了一个change事g处理函数, 在TextInput中的文本改变? 新的文本赋值给Tree当前节点的标{? 也就是改变当前Tree节点的标{ր? 值得注意的是赋值ƈ不是直接lTree中或者节点中的某个属? 而是通过修改数据源Xml的值来改变?<br>3. DataGrid的用显CZ如何在DataGrid中展CXml的技?<br>4. 最后一个Label只是单的昄当前节点的标{ր? 与TextInput的文本保持同?/p><img src ="http://www.tkk7.com/usherlight/aggbug/110820.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-04-15 20:50 <a href="http://www.tkk7.com/usherlight/archive/2007/04/15/110820.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>整理了一下Cairngorm 2.1版本的新变化http://www.tkk7.com/usherlight/archive/2007/04/10/109722.html云自无心水自?/dc:creator>云自无心水自?/author>Tue, 10 Apr 2007 11:48:00 GMThttp://www.tkk7.com/usherlight/archive/2007/04/10/109722.htmlhttp://www.tkk7.com/usherlight/comments/109722.htmlhttp://www.tkk7.com/usherlight/archive/2007/04/10/109722.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/109722.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/109722.html1. Caringorm2.1的包中增加了完整的ASDoc文档

2. 增加LocaleQ错误信息的国际化的处理?br>d了一个Properties文gQ?br>d了com.adobe.cairngorm.CairngormMessageCodes和com.adobe.cairngorm.CairngormError两个c,其中CairngormMessageCodes用于定义Properties文g中的键|而CairngormError装了ErrorQ在应用执行的过E不再直接抛出ErrorQ而抛Z个CairngormErrorQ其中带一个参数就是MessageCodeQ根据MessageCode到Properties文g中取出相应的消息?/p>

3. 在business中,d了一个IServiceLocator的接?br>ServiceLocator实现IServiceLocator接口Q相比以前增加了以下几个ҎQ?br>a、public function getRemoteObject( serviceId : String ) : RemoteObject // Return the RemoteObject for the given service id.
b、public function getHTTPService( serviceId : String ) : HTTPService // Return the HTTPService for the given service id.
c、public function getWebService( serviceId : String ) : WebService // Return the WebService for the given service id.
d、public function getConsumer( serviceId : String ) : Consumer  // Return the message Consumer for the given service id.
e、public function getProducer( serviceId : String ) : Producer // Return the message Produce for the given service id.
f、public function getDataService( serviceId : String ) : DataService // Return the DataService for the given service id.
g、public function setCredentials( username : String, password : String ) : void // Set the credentials for all registered services. Note that services that use a proxy or a third-party adapter to a remote endpoint will

原来的getService和getInvokerServiceҎ已经废弃Q改ZgetRemoteObject

4. 在Command中,增加了ICommand接口Q原来的Command接口l承ICommand

5. 在VO中,增加了IValueObject接口Q原来的ValueObjectl承IValueObject接口

上面d的几个接口,除了IServiceLocator相较2.0版本有了较大的变化,增加了一些方法,其他的几个接口,依我所见,Ua是换了名字而已?/p>

 



]]>
FDSQFlex Data ServiceQ改名ؓLiveCycle Data Servicehttp://www.tkk7.com/usherlight/archive/2007/04/04/108511.html云自无心水自?/dc:creator>云自无心水自?/author>Wed, 04 Apr 2007 11:07:00 GMThttp://www.tkk7.com/usherlight/archive/2007/04/04/108511.htmlhttp://www.tkk7.com/usherlight/comments/108511.htmlhttp://www.tkk7.com/usherlight/archive/2007/04/04/108511.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/108511.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/108511.htmlq个名字的改变反应出FDS的一个重要的扩展QLiveCycle Data Service与Adobe其他LiveCycle服务产品的整合将更紧密?br>
LiveCycel Data Service有一些重要的新的变化Q?br>1. 提升数据服务消息的性能
2. 与PDF、J2EE门户{的集成
3. 另外q有一些针Ҏ来Apollo应用的很重要的功能,比如Q本地数据缓存和脱机消息{?

下蝲地址Q?a >http://labs.adobe.com/technologies/livecycle_dataservices2_5/

]]>
Flex.org正式改版?/title><link>http://www.tkk7.com/usherlight/archive/2007/04/04/108508.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Wed, 04 Apr 2007 10:59:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/04/04/108508.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/108508.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/04/04/108508.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/108508.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/108508.html</trackback:ping><description><![CDATA[新的Flex.org把内容分?大部?br>左边4个,分别是:Flex实例QFlex下蝲、FlexC֌、帮?br>双一个大块是QFlex介绍和Flex盛会?br><br>整体感觉比以前要清新爽洁?br><br>最上面的一排菜单项好像比以前要多?br>有博客、社区、文档、下载、工作、演C、支持?img src ="http://www.tkk7.com/usherlight/aggbug/108508.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-04-04 18:59 <a href="http://www.tkk7.com/usherlight/archive/2007/04/04/108508.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Flex lib Z新版?/title><link>http://www.tkk7.com/usherlight/archive/2007/03/30/107459.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Fri, 30 Mar 2007 05:23:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/03/30/107459.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/107459.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/03/30/107459.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/107459.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/107459.html</trackback:ping><description><![CDATA[Flexlib 1.5<br />下蝲地址Q?br /><a >http://flexlib.googlecode.com/files/flexlib-.1.5.zip</a><br /><br />里面?个目录:<br />bin<br />src<br />docs<br />examples<br /><br />包含Q?br />AdvancedForm<br />ConvertibleTreeList<br />DragCanvas<br />DraggableSlider<br />HAccordion<br />ImageMap<br />PromptingTextinput<br />ScrollableMenus<br />SuperTabNavigator<br />TreeGrid<br />VerticalMenuBar<br />q些内容<img src ="http://www.tkk7.com/usherlight/aggbug/107459.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-03-30 13:23 <a href="http://www.tkk7.com/usherlight/archive/2007/03/30/107459.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一个Cairngorm的代码生成器http://www.tkk7.com/usherlight/archive/2007/03/24/106000.html云自无心水自?/dc:creator>云自无心水自?/author>Fri, 23 Mar 2007 16:13:00 GMThttp://www.tkk7.com/usherlight/archive/2007/03/24/106000.htmlhttp://www.tkk7.com/usherlight/comments/106000.htmlhttp://www.tkk7.com/usherlight/archive/2007/03/24/106000.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/106000.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/106000.htmlCaringen是一个Eric Feminella自己开发的一个小工具. 现在他把q个工具׃n出来.
Cairngenq不能让所有的x有的问题, 它只是简单地加快开发的q程.

Cairngen是一个Caringorm的代码生成器, 它得开发者可以很方便地生成Cairngorm目的结构框? 包括: Cairngorm目的目录结? 一个缺省的ModelLocator, Controller, ServiceLocator. Cairngen也可以生成Event, Command, Delegatec?

Cairngen使用Flex2和PHP5.2.0开? 利用了AMFPHP. 安装q程十分方便. 你可以在Flex Builder的浏览器中直接运行Cairngen来快速方便地生成Cairngorm的类.

Cairngen使用'步骤(Sequence)'来描qEvent, Command, DelegatecM间的关系.
在Cairngen中只要命名一?步骤',点击一下生成按钮就可以生成一?步骤'. 然后h一下Flex目, 生成的类OK? 在一些特D的情况? 你不希望dDelegatec? 那么你可以选择排除Delegatecȝ生成, q样的话, Cairngen只生成Event和Command.
生成的Commandcd现Cairngorm的Command接口, 但不实现IResponder接口. Cairngenq能够正地事件强制性{?casting)为Coand中的cd, qimport所有相关的c?

pȝ需?
1. 了解AMFPHP, Apache2.0.59和PHP5.2.0, 在用Cairngen之前要求先安装AMFPHP, 而且gateway.php的访问虚拟目录应该如下设|? http://localhost/amfphp/gateway.php. ?.0版正式发布后, q个URL可以自由配置.
2. q需要安装Flex2, PHP, 你可以用WAMP5来集成安装Apache5.5和PHP. 安装好PHP和AMFPHP? 可以解压羃Cairngen Alpha 1. 把services目录复制到amfphp的根目录? 然后复制cairgen-ui目录到apache的www根目录下.

使用:
安装好PHP和AMFPHP? 可以开始用Cairngen? 打开览器输?a href="http://localhost/cairngen-ui/Cairngen.html">http://localhost/cairngen-ui/Cairngen.html打开生成器的囑Ş界面. 创徏Cairgen目:
点击 begin
l你的Cairngen目命名. q个名称与Flex目的名U相? 选择你的Cairngorm的版? 选择Flex目的\? 讄目中包路径(比如: com.domain.projectname). 最? 验一下输入内? 点击"Create Project". hFlex目查看~省的Cairngorm目l构, ModelLocator, Service和Controllerc?

创徏"步骤":

首先是给步骤命名, 然后选择是否要生成Delegatec? 点击生成, q刷新Flex目. 可以发现需要的cdl生成完毕了. 现在需要把它们d到Controller?
接下来编辑模板文? 你可以修Ҏ板文?.tpl)来实C的特定的Cairngorm需? 模板文g?amfphp\services\com\ericfeminella\cairngen\templates目录?

生成器下载地址: http://code.ericfeminella.com/cairngen/Cairngen%20Alpha%201%20PreRelease.zip



]]>
介绍一个新的Flex的框?Q?ASAPhttp://www.tkk7.com/usherlight/archive/2007/03/13/103428.html云自无心水自?/dc:creator>云自无心水自?/author>Tue, 13 Mar 2007 01:01:00 GMThttp://www.tkk7.com/usherlight/archive/2007/03/13/103428.htmlhttp://www.tkk7.com/usherlight/comments/103428.htmlhttp://www.tkk7.com/usherlight/archive/2007/03/13/103428.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/103428.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/103428.htmlASAP是一个开源的RIA应用库,主要面向可维护的、多视频的、基于事件互动的应用开发。提供实用的、可重用的、基于模式的解决Ҏ?br />目前版本?.9.4Q从他们的网站上看,好像已经不少公司已经采用了他们的框架?br />
主页Q?a >http://asapframework.org/wiki/bin/view/ASAP/



]]>
FlexLib Q?FlexBoxhttp://www.tkk7.com/usherlight/archive/2007/03/09/102779.html云自无心水自?/dc:creator>云自无心水自?/author>Fri, 09 Mar 2007 03:46:00 GMThttp://www.tkk7.com/usherlight/archive/2007/03/09/102779.htmlhttp://www.tkk7.com/usherlight/comments/102779.htmlhttp://www.tkk7.com/usherlight/archive/2007/03/09/102779.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/102779.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/102779.html
最qAdobe公司的一批h在Google的Code Project上发布了FlexLibQ一个开源的Flex2lg库?br />现有的组件包括:
   ConvertibleTreeList, 
   Draggable Slider, 
   PromptingTextInput, 
   Scrollable Menu Controls, 
   SuperTabNavigator, 
   Alternative Scrolling Canvases, 
   Horizontal Accordion

大家可以ȝ看?br />
另外Q还有个Z发布了一个Flex2 lg目录Q?FlexBox。这个网?br />



]]>
数据l定的小技?Flex Data Binding Tiphttp://www.tkk7.com/usherlight/archive/2007/03/08/102702.html云自无心水自?/dc:creator>云自无心水自?/author>Thu, 08 Mar 2007 14:58:00 GMThttp://www.tkk7.com/usherlight/archive/2007/03/08/102702.htmlhttp://www.tkk7.com/usherlight/comments/102702.htmlhttp://www.tkk7.com/usherlight/archive/2007/03/08/102702.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/102702.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/102702.html 

现在有一个方便的做法来根据选择Enable/Disable控g。比如:有一个DataGrid和数个操作数据的按钮Q当选中某行是激zd中一个按钮,选中另一行时Q激zd中另一个按钮,{等?/p>

通常的做法是写一大堆的if else语句Q或者是讄一堆变量绑定到按钮上,然后在代码中讄q些变量的|比如Q?/p>

[Bindable] private var somethingSelected:Boolean = false;
<mx:Button label="Publish" click="publishItem()" enabled="{somethingSelected}" />

q是一个有益的试。所有的依赖于DataGrid状态的控g都绑定一个变量。改变变量的值就改变控g的enabled状态。但是你q需要确定改变变量值的时机。比如:

private function publishItem() : void {
     // get the selected item
     // publish it
     grid.selectedItem = -1; // clear the selection
     somethingSelected = false;
}

在复杂的情况下,假设有另一个按钮需要在选中某个特定值时被激zR那么你不仅需要考虑选中对应的那个变量,q需要考虑其他按钮的情c也是_在publishItem函数中你q需要设|其他变量的倹{?/p>

一个更方便的做法是q样的。现在我们Publish按钮和somethingSelected变量q行l定。我们还需要做的是把somethingSelected变量与DataGrid的选中状态进行关联。对此,我们可以使用<mx:Binding>标签?/p>

<mx:Binding source="grid.selectedIndex >= 0" destination="somethingSelected" />

q样somethingSelected的gDataGrid的选中状态就紧密地联pv来了。当选中了DataGrid中的某条数据Ӟ所有进行enabled="{somethingSelected}"l定的按钮就被激zR?lt;mx:Binding>标签的source属性不需要一定是一个变量,完全可以是一个表辑ּ?/p>

比如E微复杂一点的一个例子:

<mx:Binding source="grid.selectedItem.code == 1" destination="codeOnePicked" />

q样Q当DataGrid选中行的code字段的gؓ1Ӟ变量codeOnePicked的D讄为true?br />mxml中可以如下定义:

<mx:CheckBox label="Code One?" selected="{codeOnePicked}" />
<mx:Button label="Publish" enabled="{somethingSelected && !codeOnePicked}" />

q样Q当选中行的code字段gؓ1Ӟ上面的复选框被激z,而下面的按钮无效?/p>

]]>
开源的FDS出现http://www.tkk7.com/usherlight/archive/2007/03/01/101318.html云自无心水自?/dc:creator>云自无心水自?/author>Thu, 01 Mar 2007 14:22:00 GMThttp://www.tkk7.com/usherlight/archive/2007/03/01/101318.htmlhttp://www.tkk7.com/usherlight/comments/101318.htmlhttp://www.tkk7.com/usherlight/archive/2007/03/01/101318.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/101318.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/101318.html http://www.graniteds.org/confluence/display/INTRO/Granite+Data+Services+Overview

支持AMF3

  • 支持AMF3
  • EJB3服务的透明externalization机制Q参见Flex2的开发文?/li>

    http://www.adobe.com/livedocs/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=ent_services_config_097_11.html
    在Flex的序列化和反序列化过E中Q只能传递public的,非静态的属性,如果要序列化此部分内容在Flex与Java间传递,必须使用externalization机制

  • ActionScript3的Beans的Lazy Initialize
  • EJB3实体Bean到ActionScript3的类的代码生成(计划中)
  • POJO服务Q远E调用简单Javacȝ公共ҎQ?/li>
  • 一pdFlexlg用于复杂的数据结构(计划中)?/li>

    ]]>Flex的事件流http://www.tkk7.com/usherlight/archive/2007/02/11/99340.html云自无心水自?/dc:creator>云自无心水自?/author>Sun, 11 Feb 2007 15:50:00 GMThttp://www.tkk7.com/usherlight/archive/2007/02/11/99340.htmlhttp://www.tkk7.com/usherlight/comments/99340.htmlhttp://www.tkk7.com/usherlight/archive/2007/02/11/99340.html#Feedback1http://www.tkk7.com/usherlight/comments/commentRss/99340.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/99340.htmlFlex是一个事仉动的~程模型, M事情的发? 其背后必然存在一个事? 而开发者第一ơ看到MXML? 很难体会C个Xml标记的应用的事g和实例化的生命周期. q个对于HTML和Flash的开发者尤其会感到困惑, 因ؓ其熟悉的方式与Flex的一点也不相? HTML的实例化是从上到下的, Flash的执行是从Frame0开始一帧q行? 而Flex则又有不?

    从我们开始学习Flex? 我们需要了解事件流和MXML的实例化. 我非常困惑因为我实在难以理解什么样的事件会被触发或者事件什么时候会被触? 关键是要理解事g的基q亲自观察事件流的初始化.


    我们来看一个简单的MXML的应?

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
        xmlns:mx="    layout="absolute"
        backgroundGradientColors="[#67cbff, #fcffff]"
        color="#000000"
        fontSize="12"   
        preinitialize="report( event , 'preinitialize' )"
        initialize="report( event , 'initialize' )"
        creationComplete="report( event , 'creationComplete' )"
        applicationComplete="report( event , 'applicationComplete' )"
        >
       
        <mx:Script>
            <![CDATA[   
                       
                [Bindable]
               
                public var outTextData:String="";
               
                public function report( event:Event , value:String ):void
                {
                    outTextData += String( flash.utils.getTimer() ) + 'ms >> '
                    + event.currentTarget + '.' + value + '\n';   
                }
               
            ]]>
        </mx:Script>
       
        <mx:TextArea
            id="outTextArea"
            text="{ outTextData }"
            right="10" left="10" top="50" bottom="10" alpha="0.5"
            wordWrap="false"
            initialize="report( event , 'initialize' )"
            creationComplete="report( event , 'creationComplete' )"
            />
       
        <mx:Button
            y="10" height="30" left="168" width="150"
            id="HelloButton"
            label="Say Hello"
            initialize="report( event , 'initialize' )"
            creationComplete="report( event , 'creationComplete' )"
            rollOver="report( event , 'rollOver' )"
            rollOut="report( event , 'rollOut' )"
            click="report( event , 'click > Hello!' )"
            />
           
        <mx:Button
            id="GoodByeButton"
            label="Say Goodbye"
            y="10" left="10" height="30" width="150" color="#000000"
            initialize="report( event , 'initialize' )"
            creationComplete="report( event , 'creationComplete' )"
            click="report( event , 'click > Goodbye!' )"
            />
           
        <mx:Button
            id="ClearButton"
            label="Clear"
            y="10" left="326" height="30" color="#000000" right="10"       
            initialize="report( event , 'initialize' )"
            creationComplete="report( event , 'creationComplete' )"
            click="outTextData='';report( event , 'click' )"
             />
       
    </mx:Application>


    q个应用q行? 输出了实例流E和事g? q校我们p够看到所有事件的触发序. 可以发现应用启动? 事g的顺序是一定的. 下面是输出的内容:

    167ms >> EventFlow0.preinitialize
    183ms >> EventFlow0.outTextArea.initialize
    187ms >> EventFlow0.HelloButton.initialize
    188ms >> EventFlow0.GoodByeButton.initialize
    189ms >> EventFlow0.ClearButton.initialize
    189ms >> EventFlow0.initialize
    243ms >> EventFlow0.outTextArea.creationComplete
    243ms >> EventFlow0.HelloButton.creationComplete
    243ms >> EventFlow0.GoodByeButton.creationComplete
    244ms >> EventFlow0.ClearButton.creationComplete
    244ms >> EventFlow0.creationComplete
    246ms >> EventFlow0.applicationComplete

    一旦applicationComplete事g触发? lg׃在鼠标事件派发后触发自己的事?

    1807ms >> EventFlow0.HelloButton.rollOver
    2596ms >> EventFlow0.HelloButton.rollOut
    2954ms >> EventFlow0.HelloButton.rollOver
    3170ms >> EventFlow0.HelloButton.rollOut
    3543ms >> EventFlow0.HelloButton.rollOver
    4052ms >> EventFlow0.HelloButton.click > Hello!
    4267ms >> EventFlow0.HelloButton.click > Hello!
    4474ms >> EventFlow0.HelloButton.click > Hello!
    4569ms >> EventFlow0.HelloButton.rollOut
    4907ms >> EventFlow0.GoodByeButton.click > Goodbye!
    5130ms >> EventFlow0.GoodByeButton.click > Goodbye!

     



    ]]>
    ActionScript3.0/Flex2中的反射http://www.tkk7.com/usherlight/archive/2007/02/10/99134.html云自无心水自?/dc:creator>云自无心水自?/author>Sat, 10 Feb 2007 06:32:00 GMThttp://www.tkk7.com/usherlight/archive/2007/02/10/99134.htmlhttp://www.tkk7.com/usherlight/comments/99134.htmlhttp://www.tkk7.com/usherlight/archive/2007/02/10/99134.html#Feedback4http://www.tkk7.com/usherlight/comments/commentRss/99134.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/99134.html 

    在ActionScript 3中,你会发现在flash.utils包中有一pd函数提供了反的功能。主要包含以下功能:

        * 定对象的类
        * 获取cȝ成员、方法、构造函数、父cȝ信息
        * 定接口声明的常数和Ҏ
        * 在运行时Ҏcd创徏cȝ实例
        * 在运行时Ҏ成员名称获取或者设|对象成员的?br />    * 在运行时ҎҎ名称Q调用对象的Ҏ

    你可以用类g"describeType"之类的功能,它返回一个Xml对象。D一个例子:

    package {
        import flash.display.Sprite;
        import flash.utils.describeType;
      
        public class DescribeTypeExample extends Sprite {
            public function DescribeTypeExample() {
                var child:Sprite = new Sprite();
                var description:XML = describeType(child);
                trace(description..accessor.@name.toXMLString());
            }
        }
    }

    如果你想q一步,Ҏcd创徏对象的实例,我们可以使用"getDefinitionByName()"

    package {
        import flash.display.DisplayObject;
        import flash.display.Sprite;
        import flash.utils.getDefinitionByName;

        public class GetDefinitionByNameExample extends Sprite {
            private var bgColor:uint = 0xFFCC00;
            private var size:uint = 80;

            public function GetDefinitionByNameExample() {
                var ClassReference:Class = getDefinitionByName(“flash.display.Sprite? as Class;
                var instance:Object = new ClassReference();
                instance.graphics.beginFill(bgColor);
                instance.graphics.drawRect(0, 0, size, size);
                instance.graphics.endFill();
                addChild(DisplayObject(instance));
            }
        }
    }

    管q是一些非常方便的ҎQ但是在FlashPlayer中用反还是会有许多的限制Q因为缺乏运行时的动态源码编译。上面的功能对于那些在内建的c,比如QSpritecL说无疑是有用的,但是对于自定义类来说Q我们会遇到很多ȝ。比如:

    package {
        import com.customtypes.string; // Custom String Implementation Class
        import flash.utils.getDefinitionByName;

        public class GetDefinitionByNameExample {
            public function GetDefinitionByNameExample() {
                var ClassReference:Class = getDefinitionByName(“com.customtypes.string? as Class;
                var instance:Object = new ClassReference();
                instance.customParameter = “my parameter?
            }
        }
    }

    管我们使用了import语句Q但?getDefinitionByName()"q是会失败。原因上面已l说q了Q在q行时编译源代码是不允许的。也总后可以。在目前情况下,要实Cq功能,臛_要在代码中初始化一个类的实例。也是声明一个类的实例:

    var customType : com.customtypes.string;

     



    ]]>
    在Flex应用中用全局变量http://www.tkk7.com/usherlight/archive/2007/02/06/98259.html云自无心水自?/dc:creator>云自无心水自?/author>Tue, 06 Feb 2007 05:00:00 GMThttp://www.tkk7.com/usherlight/archive/2007/02/06/98259.htmlhttp://www.tkk7.com/usherlight/comments/98259.htmlhttp://www.tkk7.com/usherlight/archive/2007/02/06/98259.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/98259.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/98259.html 其实非常? 只需要在applicationcM定义一个publiccd的变量就行了:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    	<mx:Script>
    		<![CDATA[
    			public var foo:String = "bar";
    		]]>
    	</mx:Script>
    </mx:Application>

    在其它的地方可以?

    Application.application.foo

    来访问了. 如果需? 也可以添?Bindable 属?
    但是要注意到一个问题就? 在用的时候编译器不会q行cd的检? 因此最好添加类型强制{?

    当然, 全局变量实现的另一U方法是使用单例模式.




    ]]>
    在Flex应用中用模?modules) Ihttp://www.tkk7.com/usherlight/archive/2007/02/06/98145.html云自无心水自?/dc:creator>云自无心水自?/author>Mon, 05 Feb 2007 16:05:00 GMThttp://www.tkk7.com/usherlight/archive/2007/02/06/98145.htmlhttp://www.tkk7.com/usherlight/comments/98145.htmlhttp://www.tkk7.com/usherlight/archive/2007/02/06/98145.html#Feedback2http://www.tkk7.com/usherlight/comments/commentRss/98145.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/98145.html有许多方法可以把一个应用拆分成Z个独立下载的部分。甚至于每个类都分成单独的文gQ由ClassLoader在需要的时候加载。但是如果这h率是比较低下的,因ؓcȝ引用有着明显的“引用地域”;如果你引用了一个类Q往往会马上牵涉到需要引用一大堆其他的类Q如果把q些cd都打包在一P效率会高得多?/p>

    q译器自动选择一个非常好的打包方法是比较困难的。很可能需要在应用开发时q行一些设定,q不时地监控cȝ引用。能够统计出最优的分拆ҎQ应用应该分成几个SWFQ哪些类应该攑֜哪个SWF中。但是这U方法听h更象是一U研I范_实际操作h非常困难?/p>

    让我们来看一些更h操作性的Ҏ?/p>

    很多应用分解后,包含两种cd的功能:“启动后立即填充”和“启动后E后填充”?/p>

    有许许多多的应用是这U模式的。比如:游戏Q你有一个游戏引擎和一些游戏场景。或者Portals和Porlets; 一些基的共享功能和数据驱动的小应用。或者是一个大型的有着1500个页面的保险应用Q运行特定功能是只会讉K一部分的面。或者是充斥大量内容的应用,它可以独立的更新部分内容而不是强制用hơ浏览时都必M载全部内宏V?/p>

    我称q些相对独立的可以gq加载的功能为“模块?Modules)Q称加蝲模块的应用ؓ“Shell”?/p>

    在这里,我们先不看如何做Q先来看一?/p>

    shell需要能够与模块交互Q同h块也需要和Shell交互。如果shell引用了modules的一个类Q那么它会把它链接进来。同P如果模块cd用了shellc,它也会把它链接进来。应用能正常q行只有两个ҎQ或者引用是相同而且׃n?q样׃需要下载两?Q或者两者是不同的,而且没有M关系(管两个cd字相同,但是它们被认为是无关的,而且不能交互)?/p>

    最好的解决办法是让模块和shell通过接口交互。这Pshell不需要引用模块,而是引用模块会实现的一些接口。同P模块不实现shell的类Q而是允许调用的API接口?/p>

    q样在shell变化的时候减了重新~译模块的次数。具体实现的变化频率往往会比接口本n的变化高得多Q而只要接口稳定,׃需要重新编译所有的东西?/p>

    注意Q需要用externQ或者extern-library-path)选项来创建模块,q样可以自动剔除shell的类Q因为模块是被加载到shell的子应用域中的,shell的类剔除是安全的。这h块可以真正直接引用shell中的cR?/p>


     



    ]]>
    使用RSL(Runtime Shared Libraries)来减Flex生成的SWF文g的大?VI) -- 使用RSL的完整示?/title><link>http://www.tkk7.com/usherlight/archive/2007/02/04/97898.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Sun, 04 Feb 2007 15:36:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/02/04/97898.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/97898.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/02/04/97898.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/97898.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/97898.html</trackback:ping><description><![CDATA[<p>q个例子包括了应用中使用RSL的完整流E。用命令行q行~译Q但是你可以使用FlexBuilder用相同的q程来创Z用RSL?/p> <p>CSWC文g是一个包含SWF文g的二q制文gQ而SWF文g包含q行时的定义和附属元数据。你可以用压~工h如WinZip来打开SWC文g?br />在用RSL之前Q首先需要了解如何静态链接一个SWC文g?/p> <p>在这个例子中Q应用有一个app.mxml文gQ用ProductConfigurator.as和ProductView.as。文件目录如下:</p> <p>project/src/app.mxml<br />project/libsrc/ProductConfigurator.as<br />project/libsrc/ProductView.as <br />project/lib/<br />project/bin/</p> <p> <br />~译q个应用Ӟ可以使用source-path选项?libsrc目录下的c链接进来,Ҏ如下Q?/p> <p>cd project/src<br />mxmlc -o=../bin/app.swf -source-path+=../libsrc app.mxml</p> <p>q个命odProductConfigurator和ProductViewcdSWF文g中?/p> <p> <br />如果要创建库Q可以用compc来创建SWC文gQ用下面的命令:</p> <p>cd project<br />compc -source-path+=libsrc -debug=false -o=lib/mylib.swc<br />ProductConfigurator ProductView</p> <p>注意要将debug选项讄为false. 生成l果是project/lib/mylib.swc文gQ包含ProductConfigurator和ProductView两个cR?/p> <p>现在可以使用新创建的库来重新~译应用Q用library-path选项来指定库Q方法如下:</p> <p>cd project/src <br />mxmlc -o=../bin/app.swf -library-path+=../lib/mylib.swc app.mxml</p> <p>创徏库以后,你可以用RSL来重新编译生成应用。完整的步骤如下Q?/p> <p>   1. 指示~译器不要将库链接到应用中?br />   2. 准备RSLQ以便于在运行时使用?br />   3. 指示~译器生成附加元数据用于加蝲RSL?/p> <p> <br />W一步是指定~译生成应用时库中的哪些c需要排除在外。主要是使用external-library-path选项Q如下面的例子所C:</p> <p>cd project/src<br />mxmlc -o=../bin/app.swf -external-library-path+=../lib/mylib.swc app.mxml</p> <p>如果你尝试运行app.swfQFlash Player会抛Z个运行时异常。因为ProductConfigurator和ProductViewc还未定义。external-library-path配置选项告诉~译器编译这些库Q但是忽略了定义。你也可以用externs选项Q但是一般来_使用external-library-path更方ѝ?/p> <p>下一步是准备RSL以便于能在运行时扑ֈ它。首先从SWC文g中将library.swf解压出来?/p> <p>下面是如何解压的例子Q?/p> <p>cd project/lib<br />unzip mylib.swc library.swf<br />mv library.swf ../bin/myrsl.swf</p> <p>此例子中library.swf更名为myrsl.swfQƈ把它Ud到应用SWF文g所在的目录?/p> <p>最后一步是使用RSL重新~译应用。主要是使用runtime-shared-libraries选项Q方法如下:</p> <p>cd project/src <br />mxmlc -o=../bin/app.swf -external-library-path+=../lib/mylib.swc <br />-runtime-shared-libraries=myrsl.swf app.mxml</p> <p>现在新的SWF文g会在q行应用前动态加载RSL了?/p><img src ="http://www.tkk7.com/usherlight/aggbug/97898.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-02-04 23:36 <a href="http://www.tkk7.com/usherlight/archive/2007/02/04/97898.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用RSL(Runtime Shared Libraries)来减Flex生成的SWF文g的大?V) -- 使用RSLhttp://www.tkk7.com/usherlight/archive/2007/02/01/97340.html云自无心水自?/dc:creator>云自无心水自?/author>Thu, 01 Feb 2007 11:17:00 GMThttp://www.tkk7.com/usherlight/archive/2007/02/01/97340.htmlhttp://www.tkk7.com/usherlight/comments/97340.htmlhttp://www.tkk7.com/usherlight/archive/2007/02/01/97340.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/97340.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/97340.html在编译应用时要用RSL, 需要用下列编译选项:

        * runtime-shared-libraries 提供q行q行时共享库的位|?
        * external-library-path|externs|load-externs 提供~译时库的位|? ~译器需要这个信息动态链?


    使用runtime-shared-libraries选项来指定SWF文g的位|? q样应用能够在运行时加蝲RSL. 需要指定SWF与部|位|的相对路径. 比如: 如果把library.swf文g攑֜web_root/libraries目录? 而应用在web_root目录? 那么文g的指定方法是: libraries/library.swf
    可以用这个选项指定多个? 如果指定了多个库, 需要用逗号分隔.


    使用external-library-path选项来指定library在编译时的SWC文g或者目录的位置. ~译器会在编译时Ҏq个选项q行链接的检? 你还可以使用externs或者load-externs选项来指定其他单独的classes或者xml文g来定义库的内?


    下面是一个编译MyApp应用的命令行CZ, 其中使用?个库:

    mxmlc -runtime-shared-libraries=
    ../libraries/CustomCellRenderer/library.swf,
    ../libraries/CustomDataGrid/library.swf
    -external-library-path=../libraries/CustomCellRenderer,
    ../libraries/CustomDataGrid MyApp.mxml

    库的序非常重要, 因ؓ基础cdd加蝲.


    你先可以使用配置文g, CZ如下:

    <compiler>
        <external-library-path>
            <path-element>../libraries/CustomCellRenderer</path-element>
            <path-element>../libraries/CustomDataGrid</path-element>
            <path-element>../libs/playerglobal.swc</path-element>
        </external-library-path>
    </compiler>
    <runtime-shared-libraries>
        <url>../libraries/CustomCellRenderer/library.swf</url>
        <url>../libraries/CustomDataGrid/library.swf</url>
    </runtime-shared-libraries>


    runtime-shared-libraries选项值是library.swf文g是相寚w|目录的路径. external-library-path选项是编译时SWC文g的\? 因此, 必须先知道库的部|\?

     

    CZ? ~译时文件结构如?

    c:/appfiles/MyApp.mxml
    c:/libraries/CustomCellRenderer/CustomCellRenderer.swc
    c:/libraries/CustomDataGrid/CustomDataGrid.swc

    library.swf在编译进不是必需? Flex~译器不验证SWF文g的存在与? 但会把\径信息编译进行最后的应用代码?


    文g的部|结构如?

    web_root/MyApp.swf
    web_root/libraries/CustomCellRenderer/library.swf
    web_root/libraries/CustomDataGrid/library.swf

     



    ]]>
    使用RSL(Runtime Shared Libraries)来减Flex生成的SWF文g的大?IV) -- 创徏RSLhttp://www.tkk7.com/usherlight/archive/2007/02/01/97286.html云自无心水自?/dc:creator>云自无心水自?/author>Thu, 01 Feb 2007 07:25:00 GMThttp://www.tkk7.com/usherlight/archive/2007/02/01/97286.htmlhttp://www.tkk7.com/usherlight/comments/97286.htmlhttp://www.tkk7.com/usherlight/archive/2007/02/01/97286.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/97286.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/97286.html创徏?/p>

    可以使用Flex Builder或者Compc命o行来创徏? 库可以是一个SWC文g, 或者是包含了library.swf和catalog.xml文g的目? 一个库通常包含自定义组件和c? 然后可以在RSL中用这些库?

    在Flex Bulder? 通过使用Flex Library Build Path对话框来d资源到库?

    在命令行? 使用include-classes和include-namespaces选项来添加文件到库中.

    下面的命令行CZ说明了如何创Z个名字叫CustomCellRenderer的库:

    compc -source-path ../mycomponents/components/local
    -include-classes CustomCellRendererComponent -directory=true -debug=false
    -output ../libraries/CustomCellRenderer

    所有包含的lg必须是静态链接的文g. 使用compc~译器创建库? 不能使用include-file选项, 因ؓq个选项不是library.swf文g静态链接到库中?

    可以使用directory选项指定输出C个目录而不是到一个SWC文g?

    <?xml version="1.0">
    <flex-config>
        <compiler>
            <source-path>
                <path-element>mycomponents/components/local</path-element>
            </source-path>
        </compiler>
        <output>libraries/CustomCellRenderer</output>
        <directory>true</directory>
        <debug>false</false>
        <include-classes>
            <class>CustomCellRendererComponent</class>
        </include-classes>
    </flex-config>

    输出会是一个目?目录里包含两个文?br />    * catalog.xml
        * library.swf

    创徏library.swf文g? 你可以编译应用ƈ且指定文件的位置.



    ]]>
    Bruce Eckel(Thinking in java)的作者对Flex的看?/title><link>http://www.tkk7.com/usherlight/archive/2007/02/01/97120.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Wed, 31 Jan 2007 16:52:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/02/01/97120.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/97120.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/02/01/97120.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/97120.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/97120.html</trackback:ping><description><![CDATA[<p> <span id="hhnvtll" class="sts">UI的问题如何解军_: AWT, Swing, SWT, 或者是一些其他的比如: Tkinter, WxPython之类的东?<br />Bruce认ؓq些对于创徏一个真正跨q_的应用是不够?<br />他认为最好的解决Ҏ是Flex!<br /><br /></span> </p> <p>Flex and Flash provide a complete, unlimited, flexible tool to build user experiences. From the standpoint of a programmer’s time investment, you can learn a single language for building UIs without worrying about running into problems or limitations later—issues like:</p> <ul style="MARGIN-TOP: 0in" type="disc"> <li>Installation problems</li> <li>Constraints on what you can create</li> <li>Sudden steep climbs in the learning curve</li> </ul> <p> <br /> <br />原文链接:</p> <p> <span id="ztrfbtr" class="sts"> <a >http://www.artima.com/weblogs/viewpost.jsp?thread=193593</a> </span> </p> <p> <span id="fbdnznn" class="sts">Computing Thoughts</span> <br /> <span id="btdxrpf" class="ts">Hybridizing Java</span> <br /> <span id="pdfzlrp" class="as">by Bruce Eckel</span> <br /> <span id="ddxzttr" class="pd">January 30, 2007</span> </p><img src ="http://www.tkk7.com/usherlight/aggbug/97120.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-02-01 00:52 <a href="http://www.tkk7.com/usherlight/archive/2007/02/01/97120.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用RSL(Runtime Shared Libraries)来减Flex生成的SWF文g的大?III) -- RSL的优~点http://www.tkk7.com/usherlight/archive/2007/02/01/97117.html云自无心水自?/dc:creator>云自无心水自?/author>Wed, 31 Jan 2007 16:43:00 GMThttp://www.tkk7.com/usherlight/archive/2007/02/01/97117.htmlhttp://www.tkk7.com/usherlight/comments/97117.htmlhttp://www.tkk7.com/usherlight/archive/2007/02/01/97117.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/97117.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/97117.html RSL也需要}慎?/strong>

    RSL也不是对于所有的应用都是有益? 需要对应用RSL前后的下载时间和启动旉都测试过, 才能得到正确的结?

    RSL不能跨域׃n. 如果客户在一个域中用了RSL, 然后q行了另一个域的应? 虽然q两个RSL是相同的, 但是需要下载两?

    RSL通常会增加应用的启动旉. q是应用不管整个库实际如何? 只是单地全部加蝲整个? p一Ҏ? RSL小好. q与静态链接库的用是不同? 当你~译一个Felx应用? ~译器只解开需要的lg. 一般来? 库的大小可以是Q意的, 它只影响~译旉而不会媄响下载的旉.

    如果在好几个应用中用相同的lg? 那么可以考虑合ƈq些? 形成一个RSL. 但是如果库合q后, 每个应用只会用到其中的一部? 那么q不如多加蝲几个RSL更高?

    如果一些类重复打包在多个RSL? 那么一定要注意同步更新的问?

    RSL不能应用在基cLSprite或者MovieClip的纯ActionScript目? 因ؓRSL需要基cȝ道如何加载RSL, 比如: Application或者SimpleApplication.

    关于 framework.swc文g

    framework.swc是一个标准的SWC文g. ~省地它不能用作RSL. 整个framwork.swc文g不被链接CQ何一个应用中. Flex~译器只那些应用用到的部分链接到生成最后的SWF文g. 比如: 如果一个应用只使用了Button, Panel和TextArea控g, 那么只有q几个控件和它们的依赖项被编译器链接.

    几乎所有的应用都需要framework.swc文g的一部分, 但是它ƈ不适合作ؓRSL. 原因如上据说, RSL是整个链? 不管实际使用多少? 如果RSL包含了很多类, 而应用只使用了其中的一部? 那么q样的加载方式ƈ不是最合理? q样使用会造成应用的启动时间大大增?


    RSL的优?/p>

    下面的一个例子说明了几个的׃nlg做成RSL的优? 在这个例子中, lg库的大小?50K, ~译后的应用的大是100K.
    Application size with and without RSLs 

    使用了RSL, RSL只被下蝲一? 那么合计下蝲量是350K, 节约?0%. 如果再添加第3? W?个应用的? 每次都能150K的下载量.

    一般来? 在一个域中用同一个RSL的应用越? 那么好处p?



    ]]>
    使用RSL(Runtime Shared Libraries)来减Flex生成的SWF文g的大?II) -- 介绍链接(Linking)http://www.tkk7.com/usherlight/archive/2007/01/27/96333.html云自无心水自?/dc:creator>云自无心水自?/author>Sat, 27 Jan 2007 15:42:00 GMThttp://www.tkk7.com/usherlight/archive/2007/01/27/96333.htmlhttp://www.tkk7.com/usherlight/comments/96333.htmlhttp://www.tkk7.com/usherlight/archive/2007/01/27/96333.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/96333.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/96333.html理解链接可以帮助你理解RSL是怎样工作? Flex~译器支持静态链接和动态链? 静态链接是最通常的方? 但是动态链接你借助于RSL来实现SWF文g的羃水以及应用的下蝲ơ数.

    当你使用静态链接时, ~译器将应用中所有引用的cd依赖生成到最l的SWF文g? q个文g会比较大, 下蝲也会比较? 但是下蝲完毕? q行会比较快, 因ؓSWF文g中已l包含了所有的代码.

    如果你的应用中用了cd, 那么你需要用类路径或者是dSWC文g. 如果是用类路径, ~译器会类路径中用到的那部分类打包生成到SWF文g? 如果是用SWC文g, ~译器会整个SWC文g打包到SWF文g?

    动态链接是q样? 一个应用要使用的一部分cd在于一个外部的文g? q行时动态加? q样的话, 主SWF文g可以一? 但是应用依赖于运行时加蝲的外部文? RSL是使用动态链接的.

    如果想用动态链接类, 需要把它们~译成库. 然后~译器将库中的内容从SWF文g剔除出去. 而且必须在编译时提供链接?

    为指定哪些文件是动态链接的,需要用外部库路径选项,外部选项或者外部加载编译选项. q些选项告诉~译器从应用中去除此部分内容, 而预备在q行时调? 外部选项为动态链接指定了单独的类. 外部加蝲选项指定了一个XML文g, 描述了动态链接的c?

    指定SL的外部资源的序是非常关键的, 因ؓ被其他类调用的基cd被首先加蝲.

    你还要用runtime-shared-libraries选项来指定RSL的位|?

    你可以用link-reportq个~译选项来查看应用的链接信息.



    ]]>
    使用RSL(Runtime Shared Libraries)来减Flex生成的SWF文g的大?I) -- 介绍RSLhttp://www.tkk7.com/usherlight/archive/2007/01/27/96324.html云自无心水自?/dc:creator>云自无心水自?/author>Sat, 27 Jan 2007 14:52:00 GMThttp://www.tkk7.com/usherlight/archive/2007/01/27/96324.htmlhttp://www.tkk7.com/usherlight/comments/96324.htmlhttp://www.tkk7.com/usherlight/archive/2007/01/27/96324.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/96324.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/96324.html减小应用SWF文g大小的一个方法就是将一些共享的外部资源拆分出去, 成ؓ一个独立的文g, q样可以单独地加载缓存到客户? q些׃n资源可以由多个应用在q行时进行加? 但是传递到客户端的动作只会发生一? q些׃n文g被称行时׃n?Runtime Shared Libraries)或者简写ؓRSL.

    如果你有多个应用而且q些应用׃n一些核心组件或者类, 那么作ؓRSL,用户只会唯一的一ơ加载这些资? 只要应用在同一个域? q些应用׃n同一个缓存的RSL, q样应用文g的大就减小? 使用RSL的应用越? 效果好, 如果只有一个应? ȝ文g大小不但不减?反而会增大.

    你既可以使用Flex Builder通过目选项来创建Flex的Library目,也可以用compcq样的命令行. ~译好RSL以后, 可以在编译应用时把Library的位|传递给~译?

    下面是适合使用RSL的典型用?
        * 大型应用, 需要用通用lg库加载多个小型应? 最的应用和下应用可以׃n存储在RSL中的lg.

        * 在一个服务器上的使用通用lg库的pd应用. 当用h作第一个应用时, 用户下蝲应用的SWF文g和RSL. 当操作第二个应用? 用户只需要下载应用本w的SWF文gp?
        
        * 一个独立的应用使用RSL的意义在? 如果q个应用本n会频J的修改, 而有一部分lg是极改动的. 在这U情况下, 使用RSL的好处是: lg下蝲一? 而应用可以多ơ下?

     



    ]]>
    ~写ActionScript3.0中需要注意的10个问?/title><link>http://www.tkk7.com/usherlight/archive/2007/01/26/96236.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Fri, 26 Jan 2007 15:58:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/01/26/96236.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/96236.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/01/26/96236.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/96236.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/96236.html</trackback:ping><description><![CDATA[<p>ȝh需要注意的原则是Q尽量在~译的阶D发现错误,因ؓq时发现q解决错误远q要比在q行时出错解册v来容易的多。可是实际情况中很多人经怼q反q一原则Q下面是我列丄10个技?<br /><br />1) 永远不要使用'Object' 来存储数? 因ؓq是一U绕开~译器检查的做法Q完全不W合面向对象的思想。如果要用Hashmap或者相应的数组Q那么可以用Dictionary。否则,误已定义一个类Q而不要用Object来作为数据的存储器?br /><br />2) 不要用Object来作为对象的cd。这是欺骗编译器的方法。如果必这LQ最好在存取属性或者调用函数时Q先q行强制性的cd转换Q至这是给~译器的一个提C,也帮助其他h理解你的代码?/p> <p>3) 也不要用*cd?/p> <p>4) 不要ActionScript的类声明为动态?/p> <p>5) 注意Application.application (和其他的无类型的框架属?. q个属性有一些古?  他应该是Applicatoncd的,因ؓ他指向的实例必须是Application的子c? 但实际上他的cd?Object', 无法应用~译时的查。如果你一定要用,最好也q行cd的强制性{换?</p> <blockquote> <p>MyApplication( Application.application ).functionCall();</p> </blockquote> <p>6) 装你的Xml。用Xml与Serverq行数据的交互非常方便,但是量避免使用Xml作ؓ核心数据模型。从服务器收到数据后Q尽量把Xml转换为强cd的对象模型。在Flex应用内部使用Xml是绕开~译器的作法?</p> <p>7) 不要使用DynamicEvent. </p> <p>8) 不要使用mx:Model。如上所qͼ请尽量用自定义的强cd的类.</p> <p>9) 不要使用Cairngorm中的data属性,而应该承扩展CairngormEvent来传递数据?/p> <p>10) 不要把编译器的严格模式关?/p><img src ="http://www.tkk7.com/usherlight/aggbug/96236.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-01-26 23:58 <a href="http://www.tkk7.com/usherlight/archive/2007/01/26/96236.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Changes between Cairngorm 2.1 and Cairngorm 2.2 Betahttp://www.tkk7.com/usherlight/archive/2007/01/25/96040.html云自无心水自?/dc:creator>云自无心水自?/author>Thu, 25 Jan 2007 13:08:00 GMThttp://www.tkk7.com/usherlight/archive/2007/01/25/96040.htmlhttp://www.tkk7.com/usherlight/comments/96040.htmlhttp://www.tkk7.com/usherlight/archive/2007/01/25/96040.html#Feedback2http://www.tkk7.com/usherlight/comments/commentRss/96040.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/96040.htmlCairngorm is being packaged. Cairngorm 2.1 introduced a dependency on fds.swc, which isn't part of the standard Flex SDK - it is part of FDS. So, we've repackaged Cairngorm into the core Cairngorm and Cairngorm Enterprise - this also starts aligning Cairngorm with Steven Webster's presentation at Max when he spoke about the Cairngorm Roadmap. We're also now going to to distribute Cairngorm in Binary form (SWC), as a source zip and a documentation zip.

    * Removed dependency on Flex Data Services (fds.swc) - externalised to Cairngorm Enterprise
    * Flex SDK SWCs are no longer linked into Cairngorm.swc (produces a smaller cairngorm.swc)
    * Added support for setting remote credentials
    * Fixed bug with Web services not loading the WSDL (no need to call loadWSDL() explicitly)
    * ModelLocator interface has been deprecated. Added com.adobe.cairngorm.model.IModelLocator
    * Added deprecation metadata for compiler support

    对于我来_x的只有一点:ModelLocator被改成IModelLocator了?br />其他的只是Cairngorm的打包方式而已?br />Cairngorm2.1中依赖于fds.swcQ而fds.swc不是Flex SDK中的东西Q是FDS的一部分?br />?.2中会Cairngorm拆成两部分:Core Cairngorm和Cairngorm Enterprise
    和FDS.swc相关的部分放入Cairngorm Enterprise中?img src ="http://www.tkk7.com/usherlight/aggbug/96040.html" width = "1" height = "1" />

    ]]>
    Flex 2.0.1 不仅仅是一个简单的升http://www.tkk7.com/usherlight/archive/2007/01/21/95121.html云自无心水自?/dc:creator>云自无心水自?/author>Sun, 21 Jan 2007 05:54:00 GMThttp://www.tkk7.com/usherlight/archive/2007/01/21/95121.htmlhttp://www.tkk7.com/usherlight/comments/95121.htmlhttp://www.tkk7.com/usherlight/archive/2007/01/21/95121.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/95121.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/95121.html首先在这个版本中Q修正了数百个Bug

    1. d对Mac的支?br />2. 支持Eclipse 3.2Q而不是仅仅支?.1
    3. q行时的CSS支持
    4. 增加了一个Mercury的插Ӟ支持自动试
    5. 其他一些很的功能Q包括FlashType的字体和ASDoc的支持?/p>

    ]]>
    Flex2中遍历Tree节点http://www.tkk7.com/usherlight/archive/2007/01/07/92213.html云自无心水自?/dc:creator>云自无心水自?/author>Sun, 07 Jan 2007 06:37:00 GMThttp://www.tkk7.com/usherlight/archive/2007/01/07/92213.htmlhttp://www.tkk7.com/usherlight/comments/92213.htmlhttp://www.tkk7.com/usherlight/archive/2007/01/07/92213.html#Feedback1http://www.tkk7.com/usherlight/comments/commentRss/92213.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/92213.html q个函数只是一个示例函敎ͼ演示如何遍历一个Tree?br />此函CDh其实是两个函敎ͼ上半部分用于回溯父节点,下半部分递归遍历子节?br />

    /**
     * This method will traverse a Tree's model independent of it's
     * type.
     *
     * <p>Note :: This method may look long and arduous but, rest assured
     * it has all the checks to perform like a champ. Also, you 'could'
     * refactor part of this method but, for the sake of explanation, I
     * kept it all in one place.</p>
     *
     * <p>Remember, I had coupled the model to this method by tracing
     * @label, obviously you do not need to do this. The intention of
     * this example is to show you that the dataDescriptor seperates
     * the models type and is awesome. It enables you to create a tight
     * method like this without type checks on the model.</p>
     *
     * @param tree The Tree instance that will be examined by the method.
     * @param item An item found in the dataProvider of the Tree passed in.
     * @param startAtParent A boolean that determines if the method upon
     * initialization will back up one leve3l to the item passed in and
     * start it's recursion at the item's parent node.
     */

    public function walkTree(tree:Tree, item:Object, startAtParent:Boolean = false):void
    {
        // get the Tree's data descriptor
        var descriptor:ITreeDataDescriptor = tree.dataDescriptor;
        var cursor:IViewCursor;
       
        var parentItem:Object;
        var childItem:Object;
        var childItems:Object;
       
        // if the item is null, stop
        if(item == null)
            return;
           
        // do we back up one level to the item's parent
        if(startAtParent)
        {
            // get the parent
            parentItem = tree.getParentItem(item);
            // is the parent real
            if(parentItem)
            {
                trace("|-- Parent Node ", parentItem[tree.labelField]);
                // if the parent is a branch
                if(descriptor.isBranch(parentItem))
                {
                    // if the branch has children to run through
                    if(descriptor.hasChildren(parentItem))
                    {
                        // get the children of the branch
                        // this part of the algorithm contains the item
                        // passed
                        childItems = descriptor.getChildren(parentItem);
                    }
                }
                // if the branch has valid child items
                if(childItems)
                {
                    // create our back step cursor
                    cursor = childItems.createCursor();
                    // loop through the items parent's children (item)
                    while(!cursor.afterLast)
                    {
                        // get the current child item
                        childItem = cursor.current;

                        var label:String = childItem[tree.labelField];
                        var branch:Boolean = descriptor.isBranch(childItem);
                       
                        // good place for a custom method()
                        trace("Sibling Nodes :: ", label, "Is Branch :: ", branch);
                       
                        // if the child item is a branch
                        if(descriptor.isBranch(childItem))
                            // traverse the childs branch all the way down
                            // before returning
                            walkTree(tree, childItem);
                        // do it again!
                        cursor.moveNext();
                    }
                }
            }
        }
        else// we don't want the parent OR this is the second iteration
        {
            // if we are a branch
            if(descriptor.isBranch(item))
            {
                // if the branch has children to run through
                if(descriptor.hasChildren(item))
                {
                    // get the children of the branch
                    childItems = descriptor.getChildren(item);
                }
               
                // if the child items exist
                if(childItems)
                {
                    // create our cursor pointer
                    cursor = childItems.createCursor();
                    // loop through all of the children
                    // if one of these children are a branch we will recurse
                    while(!cursor.afterLast)
                    {
                        // get the current child item
                        childItem = cursor.current;

                        var label:String =  childItem[tree.labelField];
                        var branch:Boolean = descriptor.isBranch(childItem);
                       
                        // good place for a custom method()
                        trace("-- Sub Node :: ", label, "Is Branch :: ", branch);

                        // if the child item is a branch
                        if(descriptor.isBranch(childItem))
                            // traverse the childs branch all the way down
                            // before returning
                            walkTree(tree, childItem);
                        // check the next child
                        cursor.moveNext();
                    }
                }
            }
        }
    }
     



     



    ]]>
    Cairngorm中Model数据变化后如何自动调用一个自定义函数Q?/title><link>http://www.tkk7.com/usherlight/archive/2007/01/07/92181.html</link><dc:creator>云自无心水自?/dc:creator><author>云自无心水自?/author><pubDate>Sat, 06 Jan 2007 18:15:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2007/01/07/92181.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/92181.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2007/01/07/92181.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/92181.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/92181.html</trackback:ping><description><![CDATA[<p> </p> <p>在Flex的开发过E中Q尤其是在用Cairngorm的时候,M遇到需要在Model的属性值改变后Q需要调用一个指定的函数。传l的解决Ҏ是用一个SetterҎQ在q个Ҏ中首先对属性赋|然后调用指定的函敎ͼ比如Q?/p> <p>---------------------------<br />[ChangeEvent("deleteEnabledChange")]<br />public function get deleteEnabled() : Boolean {<br />return _deleteButtonVisible;<br />}</p> <p>public function set deleteEnabled(value : Boolean) : Void {<br />_deleteButtonVisible = value;<br />SimpleButton(deleteButton)._visible = false;<br />dispatchEvent(new Event("deleteEnabledChange", this));<br />}<br />--------------</p> <p>但是现在我们有一个更z的解决之道<br />首先dq样一个类<br />package com.adobe.ac.util <br />{ <br />   public class Observe <br />   { <br />      public var handler : Function; <br /> <br />      public function set source( source : * ) : void <br />      { <br />         handler.call(); <br />      } <br />   } <br />}<br />然后可以用这个作为标{了?br /><util:Observe source="{ model.myProperty }" <br />              handler="{ this.myFunction }"/><br />使用了这L一个标{֐Q今后嘦是对model.myPropertyq行赋|׃调用myFunction<br />q个L世上最的标签是不是很好用啊?<br /></p><img src ="http://www.tkk7.com/usherlight/aggbug/92181.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">云自无心水自?/a> 2007-01-07 02:15 <a href="http://www.tkk7.com/usherlight/archive/2007/01/07/92181.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://www-070755.com" target="_blank">Ʒ׽߹ۿ</a>| <a href="http://fenglengqi.com" target="_blank">˸徫Ʒѹۿ</a>| <a href="http://hbgksy.com" target="_blank">ûɫվ</a>| <a href="http://xiaojiejieav.com" target="_blank">AVպƷþþþ</a>| <a href="http://323799.com" target="_blank">ԻȫƵ߹ۿ</a>| <a href="http://czdlglass.com" target="_blank">鸣ۺĻһƵ1 </a>| <a href="http://djqq520.com" target="_blank">ձ˵ɫվ</a>| <a href="http://x3013.com" target="_blank">һŷĻ</a>| <a href="http://www769393.com" target="_blank">Ļ߳վ</a>| <a href="http://niu44.com" target="_blank">һд </a>| <a href="http://szybzc.com" target="_blank">avѸ߳ˮ</a>| <a href="http://jggbk.com" target="_blank">һɫþ88޾Ʒۺ</a>| <a href="http://socgl.com" target="_blank">ĻƵ</a>| <a href="http://aqd1987.com" target="_blank">޾Ʒר</a>| <a href="http://wwwxue1888.com" target="_blank">ѳ߹ۿ</a>| <a href="http://www-xg5777.com" target="_blank">ƷŮſͰˬѿ</a>| <a href="http://8xcb.com" target="_blank">þ޹Ʒ</a>| <a href="http://0102008.com" target="_blank">ѹۿëƬ</a>| <a href="http://assbjg.com" target="_blank">޵Ӱѹۿ</a>| <a href="http://0917xzb.com" target="_blank">ѹۿһƬ</a>| <a href="http://fense1.com " target="_blank">18ɽƵվ</a>| <a href="http://www-175345.com" target="_blank">޳a߹ۿ</a>| <a href="http://whspmd.com" target="_blank">˾ƷƵȫ</a>| <a href="http://5kee.com" target="_blank">ձԺ޺Ժ</a>| <a href="http://bx85.com" target="_blank">yyƵ</a>| <a href="http://paweax.com" target="_blank">ɫ͵͵޹</a>| <a href="http://wenbye.com" target="_blank">츾Ļʮг</a>| <a href="http://wenbye.com" target="_blank">ĻȫĻ</a>| <a href="http://doubaye.com" target="_blank">ۺavһ</a>| <a href="http://adcacs.com" target="_blank">һƬվ߹ۿ</a>| <a href="http://nmcytsi.com" target="_blank">ձ߿Ƭ˳Ƶ1000</a>| <a href="http://blblkj.com" target="_blank">Aɻ߹ۿ</a>| <a href="http://xianzijie.com" target="_blank">ִִֻˬƵ</a>| <a href="http://yxjcgs.com" target="_blank">ձѸƵ</a>| <a href="http://116com.com" target="_blank">һ24޿</a>| <a href="http://jdvgo.com" target="_blank">ҹ޲</a>| <a href="http://91ggan.com" target="_blank">99þù뾫Ʒ</a>| <a href="http://5kee.com" target="_blank">˾þùѹۿƵ</a>| <a href="http://513109.com" target="_blank">ղ2021</a>| <a href="http://fl6fe.com" target="_blank">պ޾Ʒ</a>| <a href="http://mychjp.com" target="_blank">91Ʒ߹ۿ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>