<?xml version="1.0" encoding="UTF-8"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><![CDATA[WalterShe's blog]]></title>
  <subtitle type="html"><![CDATA[flex,flash]]></subtitle>
  <id>http://www.flashshe.com/articles/</id>
  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/" /> 
  <link rel="self" type="application/atom+xml" href="http://www.flashshe.com/articles/atom.asp" /> 
  <generator uri="http://www.pjhome.net/" version="2.8">PJBlog3</generator> 
  <updated>2010-06-03T10:46:15+08:00</updated>

  <entry>
	  <title type="html"><![CDATA[面试的时候不要招工资谈不定的人]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=4" label="其他" /> 
	  <updated>2010-06-03T10:46:15+08:00</updated>
	  <published>2010-06-03T10:46:15+08:00</published>
		  <summary type="html"><![CDATA[正在负责面试的人可以参考下，一点小体会。<br/><br/>面试了很多人发现在面试的时候没有敲定工资的人（就是工资在面试的时候没有敲定，面试完了后你给他提价或者他同意了你的价格的那些人）都出了问题，这些人要么不踏实，要不不来，要么来了几天就走了。我以前一直把每个人都想象成和我一样，觉得他们一个个都是有职业素养的人，结果是我被这些人欺骗。<br/><br/>这些人非常耽误事，你准备了很长时间把工作交给他们，并且也制定好了相应的计划，结果不来，或者折腾了几天走了。搞得你又重现来一遍。<br/><br/>大家可能是觉得我没有和他们谈好，所以他们不满意，错，我在面试的时候都他妈的和他们谈好了，工资，福利之类的。相应的给他们email了offer letter，他们也给我回复说愿意来。如果没考虑好，不会不回复那封offer letter吗？所以从本质上来说，这些人要么人品有问题，要么就是很看重自己的利益，不会考虑别人的利益，所以这样的人你要他干嘛！！]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=18" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=18</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[传值(pass by value)的函数调用方式]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=5" label="心得体会" /> 
	  <updated>2009-12-23T14:53:25+08:00</updated>
	  <published>2009-12-23T14:53:25+08:00</published>
		  <summary type="html"><![CDATA[<strong>2010.3.31补充说明：</strong><br/>我特别奇怪为什么看文章的人不去看我推荐的<br/>1，<strong><a target="_blank" href="http://www.javaranch.com/campfire/StoryPassBy.jsp" rel="external">Pass-by-Value Please (Cup Size continued)</a></strong><br/>2，<strong><a target="_blank" href="http://javadude.com/articles/passbyvalue.htm" rel="external">Java is Pass-by-Value, Dammit!</a></strong><br/>两篇文章呢？？？？算了，再补上一篇中文文章<strong><a target="_blank" href="http://www.xiaoxiaozi.com/2010/03/05/1719/" rel="external"> JavaScript 传递参数是值传递？还是值传递？</a></strong>。<br/><br/>按引用传递应该在c语言里面提到，而后c++语言里面也有，Javascript 应该在c++语言之后出现，actionscript 语言基于javascript语言，所以actionscript 语言出现的最晚。所以我建议读者先看看c/c++语言是怎么解释 按值传递 和 按引用传递 的然后再看我这篇文章。<br/><br/>别太迷信Adobe帮助文档上的胡言乱语，因为写文档的人也只是一个人，他不一定比你高明多少。<br/><br/>写这篇文章的初衷不是想把大家搞糊涂，而是想让大家都知道这个事实，现在看来有点适得其反。看不懂的读者不要钻牛角尖了，会用就行，不懂就不懂，何必强求，这个世界那么多的未知，怎么可能都被你知道呢 <img src="http://www.flashshe.com/articles/images/smilies/Face_03.gif" border="0" style="margin:0px 0px -2px 0px" alt=""/>。<br/>————————————————————————————————————————————————<br/><br/>ActionScript 3函数调用采用的是“按值传递方式”，代码胜千言<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>private var list:Array = [&#34;hello&#34;, &#34;world&#34;, &#34;!&#34;];<br/><br/><br/>private function onInit():void<br/>{<br/>&#160;&#160;&#160;&#160;trace(&#34;befor: &#34; + list.toString());<br/>&#160;&#160;&#160;&#160;test(list);<br/>&#160;&#160;&#160;&#160;trace(&#34;after: &#34; + list.toString());<br/>}<br/><br/>private function test(v:Array):void<br/>{<br/>&#160;&#160;&#160;&#160;v = [&#34;another&#34;, &#34;hello&#34;, &#34;?&#34;];<br/>&#160;&#160;&#160;&#160;trace(v.toString());<br/>}<br/></div></div><br/><br/>输出如下：<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>befor: hello,world,!<br/>another,hello,?<br/>after: hello,world,!<br/></div></div><br/><br/>看完了是不是有点迷惑，不要紧，再仔细想想，想明白就行。<br/><br/>-------------------------------------------------------------------------<br/>2009.12.31补充说明：<br/>Adobe官方帮助文档<strong><a target="_blank" href="http://help.adobe.com/zh_CN/ActionScri&#112;t/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f56.html" rel="external">函数参数-按值或按引用传递参数</a></strong>一节中有这样一句话：<br/><div class="UBBPanel quotePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div><div class="UBBContent">在 ActionScript 3.0 中，所有的参数均按引用传递，因为所有的值都存储为对象。</div></div><br/>我不知道是不是的Adobe的工程师自己本身都没有了解什么是按值传递(pass by value)，什么是按引用传递(pass by reference)，或者是Adobe的工程师对于pass by reference有自己的一套解释？？？<br/>从本质来讲ActionScript 3.0 中，所有的参数均按值传递才对。<br/>按值传递(pass by value)和按引用传递(pass by reference)的精彩解释可以参考下面两篇文章<br/>1，<strong><a target="_blank" href="http://www.javaranch.com/campfire/StoryPassBy.jsp" rel="external">Pass-by-Value Please (Cup Size continued)</a></strong><br/>2，<strong><a target="_blank" href="http://javadude.com/articles/passbyvalue.htm" rel="external">Java is Pass-by-Value, Dammit!</a></strong><br/>-------------------------------------------------------------------------<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=16" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=16</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[开始开发as3 data structure 库]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=9" label="AS3 Data Structure" /> 
	  <updated>2009-10-10T14:46:27+08:00</updated>
	  <published>2009-10-10T14:46:27+08:00</published>
		  <summary type="html"><![CDATA[flash player 9之前actionscript 3 有一个万能的Array，flash player 10之后加了一个万能的Vector。平时用起来感觉也够用，但是我还是希望能有一套数据结构的库，这样在某些场合用起来会方便些，特别是开发游戏。因为只有游戏才会真正认真的去考虑程序性能。一个可怜的Vector怎么能解决所有的性能问题呢？<br/><br/>以上只是我的猜想，不一定真实，因为即使有了数据结构库，性能也不定比Vector好。这个就等待我开发完后去验证吧。<br/><br/>不过我的库中会包含排序算法，tree, graphic结构，这些可不是Vector能解决的，所以这个库的用途还是挺大的。<br/><br/>现在才刚开始开发，估计要今年春节后才能完成大部分。正式发布后会提供下载。在正式发布之前源代码可以在 <a href="http://code.google.com/p/as3-data-structure/" target="_blank" rel="external">http://code.google.com/p/as3-data-structure/</a> 获得（没有正式发布，通过svn下载获得的源码不能保证质量）， 采用的是 Apache License 2.0 许可，够大方吧。]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=15" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=15</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[框架运行时共享库 module载入失败 一种解决方法]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=3" label="原创教程" /> 
	  <updated>2009-06-19T15:12:44+08:00</updated>
	  <published>2009-06-19T15:12:44+08:00</published>
		  <summary type="html"><![CDATA[<strong>该文章 2009.7.28日被修改</strong><br/><br/>flex3 框架运行时共享库和module一起使用的时候会出现一些module载入失败的问题，下面和大家分享一下其中我碰到的一个问题的解决方法。<br/><br/>首先说明一下问题发生的背景：<br/>我有一个编译的flex工程,主文件是main.swf,moduleA.swf（module文件）会被main.swf载入。我把main.swf,framework_3.2.0.3958.swf，framework_3.2.0.3958.swz,moduleA.swf部署在 www.a.com/assets/目录下面，www.b.com 会去调用www.a.com/assets/main.swf文件，调用后主文件载入成功，但是在main.swf载入moduleA.swf时报错，错误的内容是<br/><div class="UBBPanel quotePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div><div class="UBBContent">RSL framework_3.2.0.3958.swf failed to load. Flex Error #1001: Digest mismatch with RSL framework_3.2.0.3958.swf. Redeploy the matching RSL o&#114; relink your application with the matching library.</div></div><br/> 于是我从网上搜索了一下这个错误信息，并找到了相应的解决方法，然后重新编译部署，发现问题还是没有解决。<br/><br/>折腾了好几天无果，偶然我通过firebug观察发现在main.swf载入moduleA.swf的时候,moduleA.swf居然去调用www.b.com/framework_3.2.0.3958.swf文件，不对啊，应该调用www.a.com/assets/framework_3.2.0.3958.swf才对啊，怎么回事情？我完全想不明白，main.swf能正确地去下载www.a.com/assets/framework_3.2.0.3958.swf，为什么moduleA.swf就不能，他们都是使用的相对地址。想不明白归想不明白，但是总算找到了解决方法了，怎么弄呢？很简单，<br/>1，在你的工程文件名称右击鼠标，打开“属性”面板...，算了不写了，麻烦，看下面的图吧<br/><br/><img src="http://www.flashshe.com/articles//blogPic/200906/rsl0.gif" border="0" alt=""/><br/><br/><img src="http://www.flashshe.com/articles//blogPic/200906/rsl1.gif" border="0" alt=""/><br/><br/><img src="http://www.flashshe.com/articles//blogPic/200906/rsl2.gif" border="0" alt=""/><br/><br/><img src="http://www.flashshe.com/articles//blogPic/200906/rsl3.gif" border="0" alt=""/><br/><br/>看完了明白了吧，就是说框架rsl部署路径使用绝对路径而不要使用相对路径，这样moduleA.swf就会去www.a.com/assets/framework_3.2.0.3958.swf下载。<br/><br/>经过一段时间的研究我终于明白了原因：<br/>Flash Player 9.0.115 或者以上版本都支持框架运行时共享库，但是他们并不是100%都能成功下载swz文件，flash player 没有成功下载到framework_3.2.0.3958.swz文件后会去下载替代文件framework_3.2.0.3958.swf。main.swf解析相对路径framework_3.2.0.3958.swf就会找到www.a.com/assets/framework_3.2.0.3958.swf并成功下载。main.swf下载moduleA.swf文件使用的是一种“导入装载（Import Loading）”的方式<br/><br/><strong>这种方式的核心代码如下：</strong><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>var loaderContext:LoaderContext = new LoaderContext( );<br/>loaderContext.securityDomain = SecurityDomain.currentDomain;<br/>loader.load(new URLRequest(&#34;<a href="http://site-a.com/child.swf" target="_blank" rel="external">http://site-a.com/child.swf</a>&#34;), loaderContext);<br/></div></div><br/>我看了下flex 3源代码发现 module和编译的css文件都是使用的这种方式。<br/>关于 导入装载（Import Loading）想了解更多可以查看 flash 帮助里面关于 flash.system.LoaderContext 类securityDomain属性的解释。<br/><br/>我的了解：通过这种方式载入的资源会认为自己的域和包裹 主flash文件 的html文件的域相同，所以moduleA.swf解析相对路径framework_3.2.0.3958.swf就会找到www.b.com/framework_3.2.0.3958.swf。<br/><br/><br/>此文禁止转载，但是您可以以超级链接的方式链接到这篇文章。<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=14" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=14</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[图片变换编辑器]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=8" label="作品" /> 
	  <updated>2008-10-14T16:38:17+08:00</updated>
	  <published>2008-10-14T16:38:17+08:00</published>
		  <summary type="html"><![CDATA[一直想做一个变换图片的组件，这段时间终于有了空闲，于是做出了<a target="_blank" href="http://www.flashshe.com/lab/imageTransformer/imageTransformer-10-14/main.html" rel="external">这么一个东东</a>。<br/><a target="_blank" href="http://www.flashshe.com/lab/imageTransformer/imageTransformer-10-14/main.html" rel="external"><img src="http://www.flashshe.com/lab/imageTransformer//transforer.jpg" border="0" alt=""/></a><br/>目前实现了移动，缩放，旋转，改变旋转中心点功能。<br/><br/>下一步的实现内容：<br/><br/>1，支持还原，前进，后退（相当于photoshop里面的撤销，反撤销操作）。<br/>2，斜切（skew）功能。<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=13" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=13</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[frames.frame label class_name [...]  编译器指令]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=3" label="原创教程" /> 
	  <updated>2008-09-22T15:40:10+08:00</updated>
	  <published>2008-09-22T15:40:10+08:00</published>
		  <summary type="html"><![CDATA[以下分析都从flex3源代码推出，不一定正确！希望能和有兴趣的朋友一起探讨。<br/><br/>Flex 3有一个编译器指令是：frames.frame label class_name [...]&nbsp;&nbsp; &#160;&#160;&#160;&#160;<br/><div class="UBBPanel quotePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div><div class="UBBContent"><br/>Specifies a SWF file frame label with a sequence of class names that are linked onto the frame.<br/><br/>This option lets you add asset factories that stream in after the application that then publish their interfaces with the ModuleManager class. The advantage to doing this is that the application starts faster than it would have if the assets had been included in the code, but does not require moving the assets to an external SWF file.<br/><br/>This is an advanced option.<br/></div></div><br/>上面的文本摘自flex builder 3 帮助文档的&nbsp;&nbsp;Application Development / Using the Flex Compilers / Using mxmlc, the application compiler 一节。<br/><br/>下面介绍一下这个指令的用法：<br/>建立一个工程，主文件名是 FrameTest.mxml，具体代码如下：<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>&lt;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&gt;<br/>&lt;mx:Application xmlns:mx=&#34;<a href="http://www.adobe.com/2006/mxml" target="_blank" rel="external">http://www.adobe.com/2006/mxml</a>&#34; layout=&#34;absolute&#34;&gt;<br/>&#160;&#160;&#160;&#160;&lt;mx:Script&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;![CDATA[<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;import flash.system.ApplicationDomain;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;private function loadImageHandler():void<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;var c:Class;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (ApplicationDomain.currentDomain.hasDefinition(&#34;SunnyImage&#34;))<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c = Class(ApplicationDomain.currentDomain.getDefinition(&#34;SunnyImage&#34;));<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sunny.source = c;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;// ...............<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (ApplicationDomain.currentDomain.hasDefinition(&#34;RainyImage&#34;))<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c = Class(ApplicationDomain.currentDomain.getDefinition(&#34;RainyImage&#34;));<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rainy.source = c;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;// ...............<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;]]&gt;<br/>&#160;&#160;&#160;&#160;&lt;/mx:Script&gt;<br/>&#160;&#160;&#160;&#160;&lt;mx:Image id=&#34;sunny&#34; x=&#34;28&#34; y=&#34;28&#34;/&gt;<br/>&#160;&#160;&#160;&#160;&lt;mx:Image id=&#34;rainy&#34; x=&#34;130&#34; y=&#34;28&#34;/&gt;<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&lt;mx:Button x=&#34;67&#34; y=&#34;99&#34; label=&#34;Load Images&#34; click=&#34;loadImageHandler()&#34;/&gt;<br/>&#160;&#160;&#160;&#160;<br/>&lt;/mx:Application&gt;<br/></div></div><br/><br/>建立一个文件夹assets（与FrameTest.mxml文件在同一个文件夹里），在assets目录里面放两张图片rainy.png和sunny.png。另外建立两个类（这两个类与FrameTest.mxml文件在同一个文件夹里）<br/>1，SunnyImage.as<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>package <br/>{<br/>&#160;&#160;&#160;&#160;import flash.display.DisplayObject;<br/>&#160;&#160;&#160;&#160;import flash.display.MovieClip;<br/>&#160;&#160;&#160;&#160;import mx.core.BitmapAsset;<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;[Embed(source=&#34;assets/sunny.png&#34;)]<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;// this calss is linked onto the 3nd frame of systemManager.<br/>&#160;&#160;&#160;&#160;public class SunnyImage extends mx.core.BitmapAsset <br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;//this method called by systemManager when systemManager&#39;s currentFrame == 3<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;public static function frame(root:DisplayObject):void<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (root is MovieClip)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;trace(&#34;currentFrame: &#34; + MovieClip(root).currentFrame);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;public function SunnyImage() <br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;{ <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;super(); <br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;}<br/><br/>}<br/></div></div><br/>2，RainyImage.as<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>package <br/>{<br/>&#160;&#160;&#160;&#160;import flash.display.DisplayObject;<br/>&#160;&#160;&#160;&#160;import flash.display.MovieClip;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;import mx.core.BitmapAsset;<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;[Embed(source=&#34;assets/rainy.png&#34;)]<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;// this calss is linked onto the 4th frame of systemManager.<br/>&#160;&#160;&#160;&#160;public class RainyImage extends mx.core.BitmapAsset <br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;//this method called by systemManager when systemManager&#39;s currentFrame == 4<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;public static function frame(root:DisplayObject):void<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (root is MovieClip)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;trace(&#34;currentFrame: &#34; + MovieClip(root).currentFrame);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;public function RainyImage() <br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;{ <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;super(); <br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;}<br/><br/>}<br/></div></div><br/>建立一个配置文件FrameTest-config.xml（与FrameTest.mxml文件在同一个文件夹里），内容如下：<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>&lt;?xml version=&#34;1.0&#34;?&gt;&nbsp;&nbsp; <br/>&nbsp;&nbsp; <br/>&nbsp;&nbsp; &lt;flex-config&gt;<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&nbsp;&nbsp; &lt;frames&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;frame&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;label&gt;Three&lt;/label&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;classname&gt;SunnyImage&lt;/classname&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/frame&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;frame&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;label&gt;Four&lt;/label&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;classname&gt;RainyImage&lt;/classname&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/frame&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/frames&gt;<br/>&#160;&#160;&#160;&#160;&lt;/flex-config&gt;<br/></div></div><br/>编译，你会发现在控制台输出 <br/>currentFrame: 3<br/>currentFrame: 4<br/><br/>在输出的swf上点击 &#34;Load Images&#34;按钮，图片出现。<br/><br/><strong>发散思维1：</strong><br/>如果你的程序里面嵌入了其他的资源，可以把资源编译进一个类，然后让这个类链接到systemManager的第二桢之后，这样你的程序的启动时间会变快。这是这个指令的一个用法，还不错吧:)<br/><br/><img src="http://www.flashshe.com/articles/images/download.gif" alt="下载文件" style="margin:0px 2px -4px 0px"/> <a href="http://www.flashshe.com/articles/attachments/month_0809/FrameTest.zip" target="_blank">下载这篇文章的工程源代码</a><br/><br/>此文禁止转载，但是您可以以超级链接的方式链接到这篇文章。<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=12" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=12</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Canvas不能接收 rollOver和roolOut事件的解决方案]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=3" label="原创教程" /> 
	  <updated>2008-09-18T17:35:16+08:00</updated>
	  <published>2008-09-18T17:35:16+08:00</published>
		  <summary type="html"><![CDATA[一个没有任何内容的透明 Canvas 不能触发rollOver和roolOut事件的侦听器函数，比如下面这个程序<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">&lt;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&gt;<br/>&lt;mx:Application xmlns:mx=&#34;<a href="http://www.adobe.com/2006/mxml" target="_blank" rel="external">http://www.adobe.com/2006/mxml</a>&#34; layout=&#34;absolute&#34;&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&lt;mx:Canvas id=&#34;canvas&#34; x=&#34;10&#34; y=&#34;10&#34; width=&#34;200&#34; height=&#34;200&#34; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rollOver=&#34;trace(&#39;in&#39;)&#34; rollOut=&#34;trace(&#39;out&#39;)&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&lt;/mx:Application&gt;<br/></div></div><br/>编译后，你把鼠标移上去，会发现没有任何输出，<br/><br/><strong>解决方法：</strong><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">1，&lt;mx:Canvas id=&#34;canvas&#34; x=&#34;10&#34; y=&#34;10&#34; width=&#34;200&#34; height=&#34;200&#34; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rollOver=&#34;trace(&#39;in&#39;)&#34; rollOut=&#34;trace(&#39;out&#39;)&#34; backgroundAlpha=&#34;0&#34; backgroundColor=&#34;#ff000&#34;/&gt;</div></div><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">2，&lt;mx:Canvas id=&#34;canvas&#34; x=&#34;10&#34; y=&#34;10&#34; width=&#34;200&#34; height=&#34;200&#34; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rollOver=&#34;trace(&#39;in&#39;)&#34; rollOut=&#34;trace(&#39;out&#39;)&#34; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;preinitialize=&#34;canvas.setStyle(&#39;mouseShield&#39;, true);&#34;/&gt;<br/></div></div><br/>前提是你的 canvas 的 borderSkin 是 mx.skins.halo::HaloBorder.<br/><br/><strong>原理：</strong><br/>没有任何内容的透明Canvas ，鼠标放上去，空无一物，当然不能触发鼠标事件。<br/>所以我们要<br/>1，backgroundAlpha=&#34;0&#34; backgroundColor=&#34;#ff000&#34;。<br/>或者<br/>2，将canvas的 mouseShield 样式设为 true，容器会自动给自己绘制一个alpha=0，白色的背景 <br/>backgroundAlpha=&#34;0&#34; backgroundColor=&#34;#ffffff&#34;（可以参考mx.skins.halo::HaloBorder类的drawBackground函数）<br/><br/>为什么MouseEvent.CLICK，MouseEvent.DOUBLE_CLICK，MouseEvent.MOUSE_DOWN，MouseEvent.MOUSE_MOVE，<br/>MouseEvent.MOUSE_OVER，MouseEvent.MOUSE_OUT，MouseEvent.MOUSE_UP，<br/>MouseEvent.MOUSE_WHEEL事件不需要这样做，因为当设置这些事件的时候，flex自动的给canvas设置了setStyle(&#39;mouseShield&#39;, true) 样式（可以参考mx.core::Container 类的addEventListener 函数）。<br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=11" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=11</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Flex 3框架中容器的边框，背景色和背景图片是如何实现的？]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=3" label="原创教程" /> 
	  <updated>2008-09-17T14:03:27+08:00</updated>
	  <published>2008-09-17T14:03:27+08:00</published>
		  <summary type="html"><![CDATA[以下分析都从flex 3源代码推出，不一定正确！希望能和有兴趣的朋友一起探讨。<br/><br/>Flex 3 框架中，容器的边框，背景色和背景图片是由容器的borderSkin 类（为了叙述方便，假设我们为容器定义了一个样式borderSkin: ClassReference(&#34;mx.skins.halo.HaloBorder&#34;)）来负责的，容器类如果检测到需要边框，背景色或者背景图片，容器会在自己内部建立一个HaloBorder类型的对象（<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">border = new mx.skins.halo.HaloBorder();<br/>// Add the border behind all the children.<br/>rawChildren.addChildAt(DisplayObject(border), 0);<br/></div></div>）border,在渲染过程中border负责建立边框，背景色或者背景图片。<br/><br/><strong>原理如下：</strong><br/>每个容器的cr&#101;ateChildren()方法中会调用cr&#101;ateBorder()方法来判断是否需要建立border，只有符合下面两个条件我们的容器才会建立边框：<br/> [1]容器没有边框（border == null）；<br/> [2]我们定义了容器的borderSkin样式 ，并且该样式类不是 mx.skins.halo::HaloBorder <strong>或者</strong> 我们定义了容器的borderSkin样式 ，并且该样式类是 mx.skins.halo::HaloBorder那么<br/> [2.1]borderStyle 样式不是 none <strong>或者</strong> borderStyle 样式是 none 并且定义了 mouseShield 样式 <strong>或者</strong> borderStyle 样式是 none 并且没有定义 mouseShield 样式 那么<br/> [2.1.1]如果定义了 backgroundColor 并且 backgroundColor != &#34;&#34; <strong>或者</strong> 定义了backgroundImage 并且 backgroundImage != &#34;&#34; <br/><br/>flex3 框架中 mx.skin::RectangularBorder 类支持backgroundImage, backgroundSize,backgroundAttachment 样式。mx.skin::HaloBorder 类实现了 backgroundColor 和 边框的绘制。<br/>类的继承链如下：HaloBorder - RectangularBorder - Border - ProgrammaticSkin - FlexShape - Shape - DisplayObject - EventDispatcher - Object<br/><br/>设置了 borderSkin: ClassReference(&#34;mx.skins.halo.HaloBorder&#34;)的容器，最底层是背景色和边框（因为背景色和边框用的是graphics绘制的），背景色上面是背景图片，背景图片上面是容器的子孙。<br/><br/><strong>此文禁止转载，但是您可以以超级链接的方式链接到这篇文章。 </strong><br/><br/><br/><strong>附录 方便我自己查阅而放在这里</strong><br/><br/>默认主题(framework.swc 中包含的 default.css文件)中有关边框，背景色和背景图片的定义<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>global<br/>{<br/>&#160;&#160;&#160;&#160;backgroundAlpha: 1.0; /* this runs the opacity of nearly every square piece of the components */<br/>&#160;&#160;&#160;&#160;/* backgroundDisabledColor: #DDDDDD; */<br/>&#160;&#160;&#160;&#160;backgroundSize: &#34;auto&#34;;<br/>&#160;&#160;&#160;&#160;bevel: true;<br/>&#160;&#160;&#160;&#160;borderAlpha: 1.0;<br/>&nbsp;&nbsp;&#160;&#160;&#160;&#160;borderCapColor: #919999;<br/>&#160;&#160;&#160;&#160;borderColor: #B7BABC;<br/>&#160;&#160;&#160;&#160;borderSides: &#34;left top right bottom&#34;;<br/>&#160;&#160;&#160;&#160;borderSkin: ClassReference(&#34;mx.skins.halo.HaloBorder&#34;);<br/>&#160;&#160;&#160;&#160;borderStyle: &#34;inset&#34;;<br/>&#160;&#160;&#160;&#160;borderThickness: 1;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...........<br/>}<br/><br/>Container<br/>{<br/>&#160;&#160;&#160;&#160;borderStyle: &#34;none&#34;;<br/>}<br/></div></div><br/>mx.core::Container 类中的和本文有关的一些定义：<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>/**<br/>&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;@private<br/>&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;Cr&#101;ate components that are children of this Container.<br/>&nbsp;&nbsp;&nbsp;&nbsp; */<br/>&nbsp;&nbsp;&nbsp;&nbsp;override protected function cr&#101;ateChildren():void<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super.cr&#101;ateChildren();<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Cr&#101;ate the border/background object.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cr&#101;ateBorder();<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// To save ourselves an extra layout pass, check to see<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// if the scrollbars will definitely be needed.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If so, cr&#101;ate them now.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cr&#101;ateOrDestroyScrollbars(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;horizontalScrollPolicy == ScrollPolicy.ON,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;verticalScrollPolicy == ScrollPolicy.ON,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;horizontalScrollPolicy == ScrollPolicy.ON ||<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;verticalScrollPolicy == ScrollPolicy.ON);<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Determine the child-creation policy (ContainerCreationPolicy.AUTO,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// ContainerCreationPolicy.ALL, o&#114; ContainerCreationPolicy.NONE).<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If the author has specified a policy, use it.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Otherwise, use the parent&#39;s policy.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// This must be set before cr&#101;ateChildren() gets called.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (creationPolicy != null)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actualCreationPolicy = creationPolicy;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (parent is Container)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (Container(parent).actualCreationPolicy ==<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ContainerCreationPolicy.QUEUED)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actualCreationPolicy = ContainerCreationPolicy.AUTO;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actualCreationPolicy = Container(parent).actualCreationPolicy;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// It is ok for actualCreationPolicy to be null. Popups require it.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (actualCreationPolicy == ContainerCreationPolicy.NONE)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actualCreationPolicy = ContainerCreationPolicy.AUTO;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (actualCreationPolicy == ContainerCreationPolicy.QUEUED)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var mainApp:Application = parentApplication ?<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application(parentApplication) :<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application(Application.application);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mainApp.addToCreationQueue(this, creationIndex, null, this);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (recursionFlag)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Cr&#101;ate whatever children are appropriate. If any were<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// previously cr&#101;ated, they don&#39;t get re-cr&#101;ated.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cr&#101;ateComponentsFromDescriptors();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If autoLayout is initially false, we still want to do<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// measurement once (even if we don&#39;t have any children)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (autoLayout == false)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forceLayout = true;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// weak references<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UIComponentGlobals.layoutManager.addEventListener(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FlexEvent.Up&#100;ate_COMPLETE, layoutCompleteHandler, false, 0, true);<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>/**<br/>&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;Cr&#101;ates the container&#39;s border skin <br/>&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;if it is needed and does not already exist.<br/>&nbsp;&nbsp;&nbsp;&nbsp; */<br/>&nbsp;&nbsp;&nbsp;&nbsp;protected function cr&#101;ateBorder():void<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!border &amp;&amp; isBorderNeeded())<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var borderClass:Class = getStyle(&#34;borderSkin&#34;);<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (borderClass != null)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border = new borderClass();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border.name = &#34;border&#34;;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (border is IUIComponent)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IUIComponent(border).enabled = enabled;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (border is ISimpleStyleClient)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ISimpleStyleClient(border).styleName = this;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Add the border behind all the children.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rawChildren.addChildAt(DisplayObject(border), 0);<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;invalidateDisplayList();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;/**<br/>&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;@private<br/>&nbsp;&nbsp;&nbsp;&nbsp; */<br/>&nbsp;&nbsp;&nbsp;&nbsp;private function isBorderNeeded():Boolean<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//trace(&#34;isBorderNeeded&#34;,this,&#34;ms&#34;,getStyle(&#34;mouseShield&#34;),&#34;borderStyle&#34;,getStyle(&#34;borderStyle&#34;));<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If the borderSkin is a custom class, always assume the border is needed.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var c:Class = getStyle(&#34;borderSkin&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Lookup the HaloBorder class by name to avoid a linkage dependency.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Note: this code assumes HaloBorder is the default border skin. If this is changed<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// in defaults.css, it must also be changed here.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (c != getDefinitionByName(&#34;mx.skins.halo::HaloBorder&#34;))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch(e:Error)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var v:Object = getStyle(&#34;borderStyle&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (v)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If borderStyle is &#34;none&#34;, then only cr&#101;ate a border if the mouseShield style is true<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// (meaning that there is a mouse event listener on this view). We don&#39;t cr&#101;ate a border<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// if our parent&#39;s mouseShieldChildren style is true.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ((v != &#34;none&#34;) || (v == &#34;none&#34; &amp;&amp; getStyle(&#34;mouseShield&#34;)))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v = getStyle(&#34;backgroundColor&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (v !== null &amp;&amp; v !== &#34;&#34;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v = getStyle(&#34;backgroundImage&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return v != null &amp;&amp; v != &#34;&#34;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>override public function styleChanged(styleProp:String):void<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var allStyles:Boolean = styleProp == null || styleProp == &#34;styleName&#34;;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Check to see if this is one of the style properties that is known<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// to affect page layout.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (allStyles || StyleManager.isSizeInvalidatingStyle(styleProp))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Some styles, such as horizontalAlign and verticalAlign,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// affect the layout of this object&#39;s children without changing the<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// view&#39;s size.&nbsp;&nbsp;This function forces the view to be remeasured<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// and layed out.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;invalidateDisplayList();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Replace the borderSkin<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (allStyles || styleProp == &#34;borderSkin&#34;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (border)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rawChildren.removeChild(DisplayObject(border));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border = null;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cr&#101;ateBorder();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Cr&#101;ate a border object, if none previously existed and<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// one is needed now.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (allStyles ||<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;styleProp == &#34;borderStyle&#34; ||<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;styleProp == &#34;backgroundColor&#34; ||<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;styleProp == &#34;backgroundImage&#34; ||<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;styleProp == &#34;mouseShield&#34; ||<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;styleProp == &#34;mouseShieldChildren&#34;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cr&#101;ateBorder();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super.styleChanged(styleProp);<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Check to see if this is one of the style properties that is known.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// to affect page layout.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (allStyles ||<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StyleManager.isSizeInvalidatingStyle(styleProp))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;invalidateViewMetricsAndPadding();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (allStyles || styleProp == &#34;horizontalScrollBarStyleName&#34;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (horizontalScrollBar &amp;&amp; horizontalScrollBar is ISimpleStyleClient)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var horizontalScrollBarStyleName:String =<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getStyle(&#34;horizontalScrollBarStyleName&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ISimpleStyleClient(horizontalScrollBar).styleName =<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;horizontalScrollBarStyleName;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (allStyles || styleProp == &#34;verticalScrollBarStyleName&#34;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (verticalScrollBar &amp;&amp; verticalScrollBar is ISimpleStyleClient)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var verticalScrollBarStyleName:String =<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getStyle(&#34;verticalScrollBarStyleName&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ISimpleStyleClient(verticalScrollBar).styleName =<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;verticalScrollBarStyleName;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/></div></div><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=10" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=10</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[ActionScript 3中如何深拷贝(deep copy)一个对象]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=5" label="心得体会" /> 
	  <updated>2008-09-12T13:52:02+08:00</updated>
	  <published>2008-09-12T13:52:02+08:00</published>
		  <summary type="html"><![CDATA[记得flash帮助文档 Programming ActionScript 3.0 / Core ActionScript 3.0 Data Types and Classes / Working with arrays /Cloning arrays 一节讲了如何深克隆(deep copy)一个数组的方法，以前一直以为这个方法只对数组有用，其实这个方法适用于所有的对象。<br/><br/>下面是我的例子：<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>&lt;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&gt;<br/>&lt;mx:Application xmlns:mx=&#34;<a href="http://www.adobe.com/2006/mxml" target="_blank" rel="external">http://www.adobe.com/2006/mxml</a>&#34; <br/>&#160;&#160;&#160;&#160;layout=&#34;absolute&#34; creationComplete=&#34;completeHandler()&#34;&gt;<br/>&#160;&#160;&#160;&#160;&lt;mx:Script&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;![CDATA[<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;import mx.controls.Button;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;import flash.utils.ByteArray;<br/><br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;public function clone(source:Object):*<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;var myBA:ByteArray = new ByteArray();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;myBA.writeObject(source);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;myBA.position = 0;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;&nbsp;&nbsp;return(myBA.readObject());<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;private var c1:CloneClass;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;private var c2:Object;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;private function completeHandler():void<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c1 = new CloneClass();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c1.age = 30;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c1.button = new Button;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c1.button.label = &#34;c1&#34;;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c2 = clone(c1);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;trace(&#34;c1: &#34; + c1.age + &#34;&nbsp;&nbsp;&#34; + c1.button.label); // 输出 c1: 30&nbsp;&nbsp;c1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;trace(&#34;c2: &#34; + c2.age + &#34;&nbsp;&nbsp;&#34; + c2.button.label); // 输出 c2: 30&nbsp;&nbsp;c1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;private function change():void<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c1.age = 50;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c1.button.label = &#34;cc1&#34;;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;trace(&#34;after changed --------------------------------&#34;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;trace(&#34;c1: &#34; + c1.age + &#34;&nbsp;&nbsp;&#34; + c1.button.label); // 输出 c1: 50&nbsp;&nbsp;cc1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;trace(&#34;c2: &#34; + c2.age + &#34;&nbsp;&nbsp;&#34; + c2.button.label); // 输出 c2: 30&nbsp;&nbsp;c1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;]]&gt;<br/>&#160;&#160;&#160;&#160;&lt;/mx:Script&gt;<br/>&#160;&#160;&#160;&#160;&lt;mx:Button x=&#34;106&#34; y=&#34;97&#34; label=&#34;Change&#34; click=&#34;change()&#34;/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&lt;/mx:Application&gt;<br/><br/></div></div><br/><strong>CloneClass 类</strong><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.flashshe.com/articles/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>package<br/>{<br/>&#160;&#160;&#160;&#160;import mx.controls.Button;<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;public class CloneClass<br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;public var button:Button;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;public var age:uint = 1;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;public function CloneClass()<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/><br/>&#160;&#160;&#160;&#160;}<br/>}<br/></div></div><br/><strong>Flex框架中已经包含了这个方法 mx.utils.ObjectUtil.copy(value:Object):Object，直接使用即可。</strong><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=9" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=9</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[删除旧的文章]]></title>
	  <author>
		 <name>Admin</name>
		 <uri>http://www.flashshe.com/articles/</uri>
		 <email>walt&#101;rshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.flashshe.com/articles/default.asp?cateID=4" label="其他" /> 
	  <updated>2008-09-08T14:31:35+08:00</updated>
	  <published>2008-09-08T14:31:35+08:00</published>
		  <summary type="html"><![CDATA[从2004年到现在，这个blog纪录了我的学习过程，这次换空间，旧的blog程序怎么也调试不好，只好换了一个新的blog程序，原来的老文章不想更新过来了，索性都干掉 <img src="http://www.flashshe.com/articles/images/smilies/Face_49.gif" border="0" style="margin:0px 0px -2px 0px" alt=""/>，只留下了最新的3篇。技术文章嘛，过时了也就没有价值了。]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.flashshe.com/articles/article.asp?id=8" /> 
	  <id>http://www.flashshe.com/articles/default.asp?id=8</id>
  </entry>	
		
</feed>
