<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flexers.cn</title>
	<atom:link href="http://www.flexers.cn/wordpress/index.php?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.flexers.cn/wordpress</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 19 Jul 2010 08:25:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>[面试最爱问的问题1]Flex/AS3的事件机制</title>
		<link>http://www.flexers.cn/wordpress/?p=130</link>
		<comments>http://www.flexers.cn/wordpress/?p=130#comments</comments>
		<pubDate>Mon, 19 Jul 2010 07:59:58 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[事件机制]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=130</guid>
		<description><![CDATA[今天静下心来看了几篇as3事件机制的教程，终于整明白这个面试中最爱问的问题了，嘎嘎！ 具体场景描述如下 容器深度：Application-&#62;Canvas-&#62;HBox-&#62;Button; 其中在HBox这个容器中有段代码 button.addEventListener(MouseEvent.Click,onButtonClickHandler); 阶段0：触发阶段，事件被触发，场景中的情况就是用户点击了Button,翻译为代码就是Button中执行了“ dispatch(new MouseEvent(MouseEvent.Click));”大家可以看下Event类中有个target的属性，这个属性就记录着Button这一事件发起者的对象 阶段1：捕获阶段，一旦有事件被触发，FP则会带着这个Event对象从整个程序的最上层开始往下遍历 ，顺序为Application-&#62;Canvas-&#62;HBox-&#62;Button，不停地匹配Event里面中的Target对象和当前遍历到的容器或是组件是不是为同一个对象 阶段2：目标阶段，终于在HBox这个容器中发现到了Button和Event中Target所指向的对象是同一个，ok，事件触发者Button终于被我挨家挨户的排查中找着了。 阶段3：冒泡阶段，从捕获到的目标Button，开始自下而上得往一级级parent走，看看到底是谁会关心Button被用户点击了。 于是再一级级往上HBox-&#62;Canvas-&#62;Application;果然在遍历到HBox的时候发现它曾经为Button的Click事件加过监听。 阶段4：执行阶段，事件的关心者HBox也找到了，那么执行onButtonClickHandler这个函数即可。]]></description>
			<content:encoded><![CDATA[<p>今天静下心来看了几篇as3事件机制的教程，终于整明白这个面试中最爱问的问题了，嘎嘎！</p>
<p>具体场景描述如下</p>
<p>容器深度：Application-&gt;Canvas-&gt;HBox-&gt;Button;</p>
<p>其中在HBox这个容器中有段代码</p>
<p>button.addEventListener(MouseEvent.Click,onButtonClickHandler);</p>
<p>阶段0：触发阶段，事件被触发，场景中的情况就是用户点击了Button,翻译为代码就是Button中执行了“ dispatch(new MouseEvent(MouseEvent.Click));”大家可以看下Event类中有个target的属性，这个属性就记录着Button这一事件发起者的对象</p>
<p>阶段1：捕获阶段，一旦有事件被触发，FP则会带着这个Event对象从整个程序的最上层开始往下遍历 ，顺序为Application-&gt;Canvas-&gt;HBox-&gt;Button，不停地匹配Event里面中的Target对象和当前遍历到的容器或是组件是不是为同一个对象</p>
<p>阶段2：目标阶段，终于在HBox这个容器中发现到了Button和Event中Target所指向的对象是同一个，ok，事件触发者Button终于被我挨家挨户的排查中找着了。</p>
<p>阶段3：冒泡阶段，从捕获到的目标Button，开始自下而上得往一级级parent走，看看到底是谁会关心Button被用户点击了。</p>
<p>于是再一级级往上HBox-&gt;Canvas-&gt;Application;果然在遍历到HBox的时候发现它曾经为Button的Click事件加过监听。</p>
<p>阶段4：执行阶段，事件的关心者HBox也找到了，那么执行onButtonClickHandler这个函数即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=130</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>【转】Create Professional Flex Component</title>
		<link>http://www.flexers.cn/wordpress/?p=126</link>
		<comments>http://www.flexers.cn/wordpress/?p=126#comments</comments>
		<pubDate>Wed, 14 Jul 2010 06:18:01 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=126</guid>
		<description><![CDATA[Flex Builder has a great way to organize its components in tree mode, which is very a good way to organize things and make things clear to any user who are coming to Flex world. By default, every component you create that is not part of default Flex components you will have placed in the [...]]]></description>
			<content:encoded><![CDATA[<p>Flex Builder has a great way to organize its components in tree mode,  which is very a good way to organize things and make things clear to  any user who are coming to Flex world.</p>
<p>By default, every component you create that is not part of default  Flex components you will have placed in the [Custom] directory of <strong>Flex  Components</strong> view in your <strong>Flex/Flash Builder</strong>,  and no matter what properties you add to them, they will never be  visible in the <strong>Flex Properties</strong> standard view.</p>
<p>But what if you want to customize that and create a component that  have them all like flex components do? Well, it&#8217;s not that hard so let&#8217;s  do that.</p>
<h4>Create the Component</h4>
<p>First, you have to <strong>create a new Flex Library Project</strong>.  Do this by going to File-&gt;New and choose Flex Library Project. Give  it a name, a location, choose whatever Flex SDK you wish to build this  for and then click finish.</p>
<p>Now you have a blank library project in which you can create whatever  components you want.<br />
Is important to use packages  correctly and namespaces and not just drop the component in the [src]  folder (you&#8217;ll see later why). First create a package (eg.  com.adm.component) in which you can add your custom component.</p>
<div>
<div>
<pre class="brush:as3">package com.adm.component
{
      import mx.containers.Canvas;

      public class mycomponent extends Canvas
      {
      }
}</pre>
</div>
</div>
<p>Okay, now let&#8217;s create some methods to have something going. We&#8217;ll  make this component be a big button with a method to enable the button  and one to change it&#8217;s caption. We&#8217;ll use setters and getter&#8217;s for those  properties because some other actions might be required when changing  them. So:</p>
<div>
<div>
<pre class="brush:as3">package com.adm.component
{
     import mx.containers.Canvas;
     import mx.controls.Button;

      public class mycomponent extends Canvas
      {
            private var _title : String = 'Title';
            private var _active : Boolean = true;

            private var btn : Button = new Button();

            public function CustomComponent()
            {
                      super();
                      this.btn.width = 100;
                      this.btn.height = 100;
                      this.btn.label = this.label;
                      this.addChild(this.btn);
            }

            public function set title(val : String) : void
            {
                      this._title = val;
                      this.btn.label = val;
            }

            public function get title() : String
            {
                     return this._title;
            }

            public function set active(val : Boolean) : void
            {
                     this._active = val;
                     this.btn.enabled= val;
            }

            public function get active() : Boolean
            {
                    return this._active;
            }
      }
}</pre>
</div>
</div>
<p>So, if you now build your project, a .swc file will be generated in  your [bin] folder, which you can add in other projects and use. But now,  the component will be placed in the [Custom] directory in the  Components View and not the one you want. We&#8217;ll do that a bit later now  let&#8217;s just&#8230;.</p>
<h4>Give it an icon</h4>
<p>This is really simple. All you have to do is get a nice looking .png  icon (16&#215;16 pixels preferably) and place it next to your component.  Then, use the <strong>IconFile</strong> metadata tag to link it to your  component.</p>
<div>
<div>
<pre class="brush:as3">....
[IconFile("icon.png")]
public class mycomponent extends Canvas
{
       private var _title : String = 'Title';
       .......</pre>
</div>
</div>
<h4>Inspectable properties</h4>
<p>If you have extra information about the property that will help code  hints or the Property Inspector (such as enumeration values or that a  String is actually a file path) then also add [Inspectable] metadata  with that extra info. For our methods we have:</p>
<div>
<div>
<pre class="brush:as3">       ...
       [Inspectable(category="General", type="String", defaultValue="")]
       public function set title(val : String) : void
       .....
       .....
       [Inspectable(category="General", type="Boolean", defaultValue="true", enumeration="true,false")]
       public function set active(val : Boolean) : void</pre>
</div>
</div>
<p>This will also help a lot when we&#8217;ll add this properties in the Flex  Properties panel. For more informations about the [Inspectable] metadata  tag visit <a href="http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;file=00001658.html" target="_blank">http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;file=00001658.html</a></p>
<h4>Create custom component folder</h4>
<p>So, if you want to build a professional component, you can&#8217;t leave  Flex add your component in the default [Custom] directory in the  Components tree. So, in order to create your own folder, we must use few  tricks.</p>
<p>First of all, you need two .xml files to describe the structure you  want flex to use and overide it&#8217;s default behavior.<br />
The first file is the manifest.xml which describes the components in the  package and their namespaces. In our case we&#8217;ll have:</p>
<div>
<div>
<pre class="brush:as3">&lt; ?xml version="1.0"?&gt;
&lt;componentpackage&gt;
    &lt;component id="mycomponent" class="org.adm.component.mycomponent"/&gt;
&lt;/componentpackage&gt;</pre>
</div>
</div>
<p>Second, we need another xml to describe the way the designer will  interpret all this.</p>
<div>
<div>
<pre class="brush:xml">&lt; ?xml version="1.0" ?&gt;
&lt;design&gt;
	&lt;namespaces&gt;
		&lt;namespace prefix="adm" uri="http://www.adm.org" /&gt;
	&lt;/namespaces&gt;
	&lt;categories&gt;
		&lt;category id="Test" label="Test Panel" defaultExpand="true" /&gt;
	&lt;/categories&gt;
	&lt;components&gt;
		&lt;component name="mycomponent" namespace="adm" category="Test" displayName="Rename Me" /&gt;
	&lt;/components&gt;
&lt;/design&gt;</pre>
</div>
</div>
<p>In the design.xml, you can specify the namespaces you used for the  components, in this case adm will point to components in the org.adm  folder.</p>
<p>Categories tag describes the folders you want added in the Components  panel. Each category must have an <strong>id</strong> which you&#8217;ll use  to tell components where they should reside, a <strong>label</strong> for the category to stand as the directory name in the Components panel.  <strong>defaultExpand</strong> is an optional parameter which if set to  true, the folder will be showed expanded by default.</p>
<p>In the components tag, you specify which component goes in what  category and under what title. The <strong>name</strong> parameter must  match the id of a component listed in the manifest.xml. All the other  parameters are pretty self explanatory.</p>
<p>Next, you have to include this two files in .swc package. To do that,  follow the steps:</p>
<p>* Right Click at your project and select Properties<br />
* In the left choose Flex Library Build Path<br />
* Select the assets tab and mark to include manifest.xml and design.xml  files<br />
* Now select the Flex Library Compiler and include your namespace URL  (in this case http://www.adm.org)<br />
* Include the manifest file .xml you&#8217;ve created<br />
* Click apply and ok to finish</p>
<p><img title="design" src="http://blog.another-d-mention.ro/wp-content/uploads/2009/06/design.png" alt="design Create professional Flex components" width="476" height="375" /><br />
<img title="manifest" src="http://blog.another-d-mention.ro/wp-content/uploads/2009/06/manifest.png" alt="manifest Create professional Flex components" width="483" height="380" /></p>
<p>After this, you should end up with something like this</p>
<p><img title="comppanel" src="http://blog.another-d-mention.ro/wp-content/uploads/2009/06/comppanel.png" alt="comppanel Create professional Flex components" width="297" height="225" /></p>
<h4>Add properties to the Flex Properties view</h4>
<p>As I said before, no matter what properties you add to your  component, they will never be visible in the <strong>Flex Properties</strong> standard view, only in the category view and that only if you use the  [Inspectable] metadata tag. But few more lines in the design.xml file  should take care of that.</p>
<div>
<div>
<pre class="brush:xml">&lt;component name="mycomponent" namespace="adm" category="Test" displayName="Rename Me"&gt;
		&lt;mxmlproperties&gt;
			&lt;textfield id="title" name="Component Title:" /&gt;
			&lt;combo id="active" name="Active:" /&gt;
		&lt;/mxmlproperties&gt;
		&lt;defaultattribute name="active" value="true" /&gt;
	&lt;/component&gt;</pre>
</div>
</div>
<p>The id of the mxmlProperties tag should be the function/variable  names from your component you want to edit. You can also define default  values for those properties using the defaultAttribute tag below. Here  we&#8217;ve only used the textfield and the combo type but there are few more  you can use.</p>
<div>
<div>
<pre class="brush:xml">&lt;textfiled id="propertyOrStyle" name="Label:" [multiline="false"] /&gt;
&lt;combo id="propertyOrStyle" name="Label:" /&gt;
&lt;colorpicker id="propertyOrStyle" name="Label:" /&gt;
&lt;filepicker id="propertyOrStyle" name="Label:" [wrapInEmbed="false"] /&gt;
&lt;slider id="propertyOrStyle" name="Label:" min="0" max="10" increment="1" /&gt;</pre>
</div>
</div>
<p>For combo boxes, if you use it for a Boolean property, it will  automatically be populated with [true,false] values but if want  something else, the [Inspectable] metadata tag has the enumeration  property where you can define the properties from this combo.</p>
<p><img title="flexprop" src="http://blog.another-d-mention.ro/wp-content/uploads/2009/06/flexprop.png" alt="flexprop Create professional Flex components" width="298" height="207" /></p>
<p>Another thing you must do in order to apply the values as soon as you  change them from the properties view, is to set the functions/variables  as [Bindable].</p>
<div>
<div>
<pre class="brush:as3">    ....
    [Inspectable(category="General", type="String", defaultValue="")]
    [Bindable]
    public function set title(val : String) : void
	....
	....
    [Inspectable(category="General", type="Boolean", defaultValue="true", enumeration="true,false")]
    [Bindable]
    public function set active(val : Boolean) : void
	....
	....</pre>
</div>
</div>
<h4>One more thing</h4>
<p>Now, compiling this will give you a 300 something KB .swc file which  is a bit large to distribute. The user will use this component inside a  flex component so embedding all the libraries and SDK inside your .swc  is useless. So the next step is to go to Properties-&gt;Flex Library  Build Path-&gt;Library path tab, expand the build path library try and  edit everything inside the SDK tree on Link Type and choose <strong>External</strong></p>
<p><img title="paths" src="http://blog.another-d-mention.ro/wp-content/uploads/2009/06/paths.png" alt="paths Create professional Flex components" width="526" height="287" /></p>
<p>Now the swc component only have 4KB. Big cut down, eh ?</p>
<h4>Done</h4>
<p>If this is to much trouble for you or you&#8217;ve missed something, I&#8217;ve  attached the sources for this tutorial <a href="http://blog.another-d-mention.ro/stuff/component.zip">here</a>.  You can import this skeleton  rename the package, namespace and the  component and start building on this. I hope it all made sense  and&#8230;.happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=126</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML、XMLList、XMLListCollection 三者的区别</title>
		<link>http://www.flexers.cn/wordpress/?p=120</link>
		<comments>http://www.flexers.cn/wordpress/?p=120#comments</comments>
		<pubDate>Thu, 04 Mar 2010 01:46:12 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XMLList]]></category>
		<category><![CDATA[XMLListCollection]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=120</guid>
		<description><![CDATA[正好看到有网友在艾睿论坛上提问。http://bbs.airia.cn/FLEX/thread-10337-1-1.aspx XML 和XMLList都继承于Object。如果XML是最小单位的话，XMLList与之的区别就是api doc中下面这句话。The XMLList class contains methods for working with one or more XML elements. An XMLList object can represent one or more XML objects or elements (including multiple nodes or attributes), so you can call methods on the elements as a group or on the individual elements in the collection. 即XMLList是一个或多个XML的组合形式。如XML的结构是&#60;data&#62; &#60;item&#62;value1&#60;/item&#62;&#60;data&#62;那么XMLList的结构可以是一个XML&#60;data&#62; &#60;item&#62;value1&#60;/item&#62;&#60;data&#62;也可以是多个XML&#60;data&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>正好看到有网友在艾睿论坛上提问。<a href="http://bbs.airia.cn/FLEX/thread-10337-1-1.aspx">http://bbs.airia.cn/FLEX/thread-10337-1-1.aspx</a></p>
<p>XML 和XMLList都继承于Object。如果XML是最小单位的话，XMLList与之的区别就是api doc中下面这句话。<br />The XMLList class contains methods for working with one or more XML elements. An XMLList object can represent one or more XML objects or elements (including multiple nodes or attributes), so you can call methods on the elements as a group or on the individual elements in the collection. </p>
<p>即XMLList是一个或多个XML的组合形式。<br />如XML的结构是<br />&lt;data&gt;<br /> &lt;item&gt;value1&lt;/item&gt;<br />&lt;data&gt;<br />那么XMLList的结构可以是一个XML<br />&lt;data&gt;<br /> &lt;item&gt;value1&lt;/item&gt;<br />&lt;data&gt;<br />也可以是多个XML<br />&lt;data&gt;<br /> &lt;item&gt;value1&lt;/item&gt;<br />&lt;data&gt;<br />&lt;data&gt;<br /> &lt;item&gt;value2&lt;/item&gt;<br />&lt;data&gt;</p>
<p>XMLListCollection 的继承于ListCollectionView,ListCollectionView这个类看着挺眼熟吧，不错我们最常用的 ArrayCollection就是继承于这个ListCollectionView。api doc中下面这句话描述了XMLListCollection的作用<br />The XMLListCollection class provides collection functionality to an XMLList object and makes available some of the methods of the native XMLList class.</p>
<p>XMLListCollection的作用是给XMLList 增加一些集合功能如addItem等，前提是你需要<br />new XMLListCollection(new XMLList())</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=120</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转]正则表达式备忘</title>
		<link>http://www.flexers.cn/wordpress/?p=117</link>
		<comments>http://www.flexers.cn/wordpress/?p=117#comments</comments>
		<pubDate>Wed, 03 Mar 2010 09:34:06 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[others]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=117</guid>
		<description><![CDATA[下表是元字符及其在正则表达式上下文中的行为的一个完整列表： \ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个后向引用、或一个八进制转义符。 ^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的Multiline 属性，^ 也匹配 ’\n’ 或 ’\r’ 之后的位置。 $ 匹配输入字符串的结束位置。如果设置了 RegExp 对象的Multiline 属性，$ 也匹配 ’\n’ 或 ’\r’ 之前的位置。 * 匹配前面的子表达式零次或多次。 + 匹配前面的子表达式一次或多次。+ 等价于 {1,}。 ? 匹配前面的子表达式零次或一次。? 等价于 {0,1}。 {n} n 是一个非负整数，匹配确定的n 次。 {n,} n 是一个非负整数，至少匹配n 次。 {n,m} m 和 n 均为非负整数，其中n]]></description>
			<content:encoded><![CDATA[<p>下表是元字符及其在正则表达式上下文中的行为的一个完整列表：<br />
\ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个后向引用、或一个八进制转义符。<br />
^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的Multiline 属性，^ 也匹配 ’\n’ 或 ’\r’ 之后的位置。<br />
$ 匹配输入字符串的结束位置。如果设置了 RegExp 对象的Multiline 属性，$ 也匹配 ’\n’ 或 ’\r’ 之前的位置。<br />
* 匹配前面的子表达式零次或多次。<br />
+ 匹配前面的子表达式一次或多次。+ 等价于 {1,}。<br />
? 匹配前面的子表达式零次或一次。? 等价于 {0,1}。<br />
{n} n 是一个非负整数，匹配确定的n 次。<br />
{n,} n 是一个非负整数，至少匹配n 次。<br />
{n,m} m 和 n 均为非负整数，其中n <= m。最少匹配 n 次且最多匹配 m 次。在逗号和两个数之间不能有空格。<br />
? 当该字符紧跟在任何一个其他限制符 (*, +, ?, {n}, {n,}, {n,m}) 后面时，匹配模式是非贪婪的。非贪婪模式尽可能少的匹配所搜索的字符串，而默认的贪婪模式则尽可能多的匹配所搜索的字符串。<br />
. 匹配除 "\n" 之外的任何单个字符。要匹配包括 ’\n’ 在内的任何字符，请使用象 ’[.\n]’ 的模式。<br />
(pattern) 匹配pattern 并获取这一匹配。<br />
(?:pattern) 匹配pattern 但不获取匹配结果，也就是说这是一个非获取匹配，不进行存储供以后使用。<br />
(?=pattern) 正向预查，在任何匹配 pattern 的字符串开始处匹配查找字符串。这是一个非获取匹配，也就是说，该匹配不需要获取供以后使用。<br />
(?!pattern) 负向预查，与(?=pattern)作用相反<br />
<span id="more-117"></span><br />
x|y 匹配 x 或 y。<br />
[xyz] 字符集合。<br />
[^xyz] 负值字符集合。<br />
[a-z] 字符范围，匹配指定范围内的任意字符。<br />
[^a-z] 负值字符范围，匹配任何不在指定范围内的任意字符。<br />
\b 匹配一个单词边界，也就是指单词和空格间的位置。<br />
\B 匹配非单词边界。<br />
\cx 匹配由x指明的控制字符。<br />
\d 匹配一个数字字符。等价于 [0-9]。<br />
\D 匹配一个非数字字符。等价于 [^0-9]。<br />
\f 匹配一个换页符。等价于 \x0c 和 \cL。<br />
\n 匹配一个换行符。等价于 \x0a 和 \cJ。<br />
\r 匹配一个回车符。等价于 \x0d 和 \cM。<br />
\s 匹配任何空白字符，包括空格、制表符、换页符等等。等价于[ \f\n\r\t\v]。<br />
\S 匹配任何非空白字符。等价于 [^ \f\n\r\t\v]。<br />
\t 匹配一个制表符。等价于 \x09 和 \cI。<br />
\v 匹配一个垂直制表符。等价于 \x0b 和 \cK。<br />
\w 匹配包括下划线的任何单词字符。等价于[A-Za-z0-9_]。<br />
\W 匹配任何非单词字符。等价于[^A-Za-z0-9_]。<br />
\xn 匹配 n，其中 n 为十六进制转义值。十六进制转义值必须为确定的两个数字长。<br />
\num 匹配 num，其中num是一个正整数。对所获取的匹配的引用。<br />
\n 标识一个八进制转义值或一个后向引用。如果 \n 之前至少 n 个获取的子表达式，则 n 为后向引用。否则，如果 n 为八进制数字 (0-7)，则 n 为一个八进制转义值。<br />
\nm 标识一个八进制转义值或一个后向引用。如果 \nm 之前至少有is preceded by at least nm 个获取得子表达式，则 nm 为后向引用。如果 \nm 之前至少有 n 个获取，则 n 为一个后跟文字 m 的后向引用。如果前面的条件都不满足，若 n 和 m 均为八进制数字 (0-7)，则 \nm 将匹配八进制转义值 nm。<br />
\nml 如果 n 为八进制数字 (0-3)，且 m 和 l 均为八进制数字 (0-7)，则匹配八进制转义值 nml。 \un 匹配 n，其中 n 是一个用四个十六进制数字表示的Unicode字符。<br />
     下面是常用的正则表达式——<br />
验证数字：^[0-9]*$<br />
验证n位的数字：^\d{n}$<br />
验证至少n位数字：^\d{n,}$<br />
验证m-n位的数字：^\d{m,n}$<br />
验证零和非零开头的数字：^(0|[1-9][0-9]*)$<br />
验证有两位小数的正实数：^[0-9]+(.[0-9]{2})?$<br />
验证有1-3位小数的正实数：^[0-9]+(.[0-9]{1,3})?$<br />
验证非零的正整数：^\+?[1-9][0-9]*$<br />
验证非零的负整数：^\-[1-9][0-9]*$<br />
验证非负整数（正整数 + 0）  ^\d+$<br />
验证非正整数（负整数 + 0）  ^((-\d+)|(0+))$<br />
验证长度为3的字符：^.{3}$<br />
验证由26个英文字母组成的字符串：^[A-Za-z]+$<br />
验证由26个大写英文字母组成的字符串：^[A-Z]+$<br />
验证由26个小写英文字母组成的字符串：^[a-z]+$<br />
验证由数字和26个英文字母组成的字符串：^[A-Za-z0-9]+$<br />
验证由数字、26个英文字母或者下划线组成的字符串：^\w+$<br />
验证用户密码:^[a-zA-Z]\w{5,17}$ 正确格式为：以字母开头，长度在6-18之间，只能包含字符、数字和下划线。<br />
验证是否含有 ^%&#038;&#8217;,;=?$\&#8221; 等字符：[^%&#038;',;=?$\x22]+<br />
验证汉字：^[\u4e00-\u9fa5],{0,}$<br />
验证Email地址：^\w+[-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$<br />
验证InternetURL：^http://([\w-]+\.)+[\w-]+(/[\w-./?%&#038;=]*)?$ ；^[a-zA-z]+://(w+(-w+)*)(.(w+(-w+)*))*(?S*)?$<br />
验证电话号码：^(\(\d{3,4}\)|\d{3,4}-)?\d{7,8}$：&#8211;正确格式为：XXXX-XXXXXXX，XXXX-XXXXXXXX，XXX-XXXXXXX，XXX-XXXXXXXX，XXXXXXX，XXXXXXXX。<br />
验证身份证号（15位或18位数字）：^\d{15}|\d{}18$<br />
验证一年的12个月：^(0?[1-9]|1[0-2])$ 正确格式为：“01”-“09”和“1”“12”<br />
验证一个月的31天：^((0?[1-9])|((1|2)[0-9])|30|31)$    正确格式为：01、09和1、31。<br />
整数：^-?\d+$<br />
非负浮点数（正浮点数 + 0）：^\d+(\.\d+)?$<br />
正浮点数   ^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$<br />
非正浮点数（负浮点数 + 0） ^((-\d+(\.\d+)?)|(0+(\.0+)?))$<br />
负浮点数  ^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$<br />
浮点数  ^(-?\d+)(\.\d+)?$</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=117</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转]Flex组件的继承关系</title>
		<link>http://www.flexers.cn/wordpress/?p=114</link>
		<comments>http://www.flexers.cn/wordpress/?p=114#comments</comments>
		<pubDate>Wed, 24 Feb 2010 01:46:54 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=114</guid>
		<description><![CDATA[通过继承，会了某一个组件的用法，与它有同样的继承关系的组件也就了解了 FLEX组件继承关系： Object->EventDispather->DisplayObject->InteractiveObject->DisplayObjectContainer->Sprite->UIcomponet->All components >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 容器类组件 Application继承关系 UIComponent->Container->LayoutContainer->Application ApplicationControlBar继承关系 UIcomponent->Container->Box->ControlBar->ApplicationControlBar 其主要用于全局导航，其是ControlBar的子类，后者用于Panel及itleWindow Canvas继承关系 UIcomponent->Container->Canvas 其只有absolute布局 Box,HBox,VBox继承关系 UIcomponent->Container->Box,然后HBox,VBox是Box的子类，实际上Box有个属性direction,可以使其显示为HBox或HBox DividedBox,HDividedBox,VDividedBox继承关系 UIcomponent->Container->Box->DividedBox ,然后HDividedBox,VDividedBox是其子类，三者之间的关系同Box与HBox,Vbox的关系一样 Panel继承关系 UIcomponent->Container->Panel Panel可以在下部包含一个ControlBar Panel的布局方式为absolute时，相当于Canvas 为vertical时，相当于VBox 为horizontal时，相当于HBox TitleWindow继承关系 UIcomponent->Container->Panel->TitleWindow,其与Panel基本一样， 它可以在右上角显示一个关闭按钮，其一般当做弹出窗口使用,当做弹出窗口时，用PopUpManager类来管理 在Flex自带的帮助TitleWindow layout container中有大量的例子及教程，关于用PopUpManager来操作TitleWindow的 Form继承关系 UIcomponent->Container->Form Form内部可以有 UIComponent->FormHeading UIcomponent->Container->FormItem 这里看下Flex自带的帮助中的Form, FormHeading, and FormItem layout containers,里边有如何设置 各部分的间隔等教程 Title继承关系 UIcomponent->Container->Title Grid继承关系UIcomponent->Container->Box->Grid 其内部可以有 UIcomponent->Container->Box->HBox->GridRow UIcomponent->Container->Box->HBox->GridItem Accordion继承关系 UIcomponent->Container->Accordion ViewStack继承关系 UIcomponent->Container->ViewStack ViewStack没有内建的切换内部容器的机制，其必须和一组按钮或 LinkBar,ButtonBar,ToggleButtonBar,TabBar配合使用,这些都是NavBar的子类或子子类 [...]]]></description>
			<content:encoded><![CDATA[<p>通过继承，会了某一个组件的用法，与它有同样的继承关系的组件也就了解了</p>
<p>FLEX组件继承关系：<br />
Object->EventDispather->DisplayObject->InteractiveObject->DisplayObjectContainer->Sprite->UIcomponet->All components</p>
<p>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 容器类组件</p>
<p>Application继承关系<br />
UIComponent->Container->LayoutContainer->Application</p>
<p>ApplicationControlBar继承关系<br />
UIcomponent->Container->Box->ControlBar->ApplicationControlBar<br />
其主要用于全局导航，其是ControlBar的子类，后者用于Panel及itleWindow<br />
<span id="more-114"></span><br />
Canvas继承关系<br />
UIcomponent->Container->Canvas<br />
其只有absolute布局</p>
<p>Box,HBox,VBox继承关系<br />
UIcomponent->Container->Box,然后HBox,VBox是Box的子类，实际上Box有个属性direction,可以使其显示为HBox或HBox</p>
<p>DividedBox,HDividedBox,VDividedBox继承关系</p>
<p>UIcomponent->Container->Box->DividedBox ,然后HDividedBox,VDividedBox是其子类，三者之间的关系同Box与HBox,Vbox的关系一样</p>
<p>Panel继承关系<br />
UIcomponent->Container->Panel<br />
Panel可以在下部包含一个ControlBar<br />
Panel的布局方式为absolute时，相当于Canvas<br />
               为vertical时，相当于VBox<br />
               为horizontal时，相当于HBox</p>
<p>TitleWindow继承关系<br />
UIcomponent->Container->Panel->TitleWindow,其与Panel基本一样，<br />
它可以在右上角显示一个关闭按钮，其一般当做弹出窗口使用,当做弹出窗口时，用PopUpManager类来管理<br />
在Flex自带的帮助TitleWindow layout container中有大量的例子及教程，关于用PopUpManager来操作TitleWindow的</p>
<p>Form继承关系<br />
UIcomponent->Container->Form<br />
Form内部可以有<br />
UIComponent->FormHeading<br />
UIcomponent->Container->FormItem<br />
这里看下Flex自带的帮助中的Form, FormHeading, and FormItem layout containers,里边有如何设置<br />
各部分的间隔等教程</p>
<p>Title继承关系<br />
UIcomponent->Container->Title</p>
<p>Grid继承关系UIcomponent->Container->Box->Grid<br />
其内部可以有<br />
UIcomponent->Container->Box->HBox->GridRow<br />
UIcomponent->Container->Box->HBox->GridItem</p>
<p>Accordion继承关系<br />
UIcomponent->Container->Accordion</p>
<p>ViewStack继承关系<br />
UIcomponent->Container->ViewStack<br />
ViewStack没有内建的切换内部容器的机制，其必须和一组按钮或<br />
LinkBar,ButtonBar,ToggleButtonBar,TabBar配合使用,这些都是NavBar的子类或子子类</p>
<p>TabNavigator继承关系<br />
UIcomponent->Container->ViewStack->TabNavigator<br />
TabNavigato是ViewStack加TabBar的效果</p>
<p>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 常规组件<br />
Alert继承关系<br />
UIcomponent->Container->Panel->Alert</p>
<p>ColorPicker继承关系<br />
UIcomponent->ComboBase->ColorPicker<br />
其有个dataProvider属性，可以指定提供哪些颜色供选择</p>
<p>ComboBox继承关系<br />
UIcomponent->ComboBase->ComboBox</p>
<p>HorizontalList继承关系<br />
UIcomponent->ScrollControlBase->ListBase->TileBase->HorizontalList</p>
<p>TileList继承关系<br />
UIcomponent->ScrollControlBase->ListBase->TileBase->TitleList</p>
<p>List继承关系<br />
UIcomponent->ScrollControlBase->ListBase->List</p>
<p>Tree继承关系<br />
UIcomponent->ScrollControlBase->ListBase->List->Tree</p>
<p>DataGrid继承关系<br />
UIComponent->ScrollControlBase->ListBase->DataGridBase->DataGrid</p>
<p>TabBar继承关系<br />
UIcomponent->Container->Box->NavBar->ButtonBar->ToggleButtonBar->TabBar<br />
ButtonBar与ToggleButtonBar类似，后者放开鼠标后能显示按下的状态,TabBar也是显示按下状态，但外观不一样</p>
<p>LinkBar继承关系<br />
UIcomponent->Container->Box->NavBar->LinkBar<br />
其在内部根据数据源产生LinkButton</p>
<p>几个简单的组件:<br />
UIcomponent->ProgressBar进度条<br />
UIcomponent->Spacer 空生空白的空间<br />
UIComponent->HRule及VRule 创建水平或坚直的线<br />
UIComponent->NumericStepper 提供数据供选择，类似于ComboBox，但不产生下拉列表<br />
UIComponent->Slider->HSlider及VSlider 通过拖到选择数据<br />
UIComponent->ScrollBar->HScrollBar及VScrollBar,通常不单独使用,空间不够时自动产生</p>
<p>UIComponent->Button<br />
UIComponent->Button->CheckBox<br />
UIComponent->Button->RadioButton<br />
Object->EventDispatcher->RadioButtonGroup 这个比较特别<br />
UIComponent->Button->LinkButton<br />
UIComponent->Button->PopUpButton　弹出一个菜单<br />
UIComponent->Button->PopUpButton->PopUpMenuButton　数据源自动转成一个菜单<br />
PopUpButton比Button多了一个pop-up button可以弹出Menu或List,通过属性Popup指定</p>
<p>UIComponent->DateChooser<br />
UIcomponent->ComboBase->DateField</p>
<p>UIComponent->MenuBar 横向菜单</p>
<p>UIComponent->Label->Text Lable显示单行字，Text可以显示多行</p>
<p>UIComponent->ScrollControlBase->TextArea<br />
UIComponent->TextInput<br />
UIcomponent->Container->Panel-> RichTextEditor 这个控件的外观不是固定的，可以添加删除其它组件，具体看下帮助</p>
<p>补充：<br />
一：集合<br />
ArrayCollection,XMLListCollection 继承了<br />
mx.collections.ListCollectionView ,其实现了mx.collections.ICollectionView 和mx.collections.IList接口. 这两个接口提供了查看和</p>
<p>修改数据的基本方法,ArrayCollection用一个数组做数据源. XMLListCollection用XMLLIST做数据源对象</p>
<p>总的来说集特征如下：当数据源发生改变生，组件即时更新显示,可以查看，修改，排序源数据</p>
<p>有两种数据源类型<br />
线性的</p>
<p>层级的，一般用于Tree,Menu,MenuBar,PopUpMenuButton</p>
<p>定义数据源的方法<br />
用<mx:dataProvider>标签<br />
在AS中定义</p>
<p>二：层级数据对象</p>
<p>可以是XML相关格式或Objects</p>
<p>三：使用条目逞现器和编辑器,用于ListBase下相关的控件</p>
<p>四:Menu，这个只能通过AS来创建</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=114</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用RSL减少swf体积进阶篇</title>
		<link>http://www.flexers.cn/wordpress/?p=97</link>
		<comments>http://www.flexers.cn/wordpress/?p=97#comments</comments>
		<pubDate>Tue, 17 Nov 2009 08:20:00 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[flex3]]></category>
		<category><![CDATA[rsl]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=97</guid>
		<description><![CDATA[国庆刚过，手头上没什么事，看看论坛，打打酱油，闲着也是闲着随便写点项目开发中小心得吧

市面上RSL文章很多，基础的我就不写了（一般都是把framework_3.x.x.xxxx.swz文件剥离出去），这里写几则平时不常见的RSL使用小技巧]]></description>
			<content:encoded><![CDATA[<p>国庆刚过，手头上没什么事，看看论坛，打打酱油，闲着也是闲着随便写点项目开发中小心得吧</p>
<p>市面上RSL文章很多，基础的我就不写了（一般都是把framework_3.x.x.xxxx.swz文件剥离出去），这里写几则平时不常见的RSL使用小技巧</p>
<p>技巧一： <br />datavisualization_3.x.x.xxxx.swz 还有rpc_3.x.x.xxxx.swz这两个文件也是可以剥离出去的</p>
<p>技巧二： <br />有些同学把datavisualization和rpc剥离出去后，发现除了runtimes exception，说什么tween effect有问题，这个时候就需要在Flex build path面板中进行加载顺序的设置了，把framework提升到最上面。</p>
<p><img class="alignnone size-full wp-image-98" title="pic" src="http://www.flexers.cn/wordpress/wp-content/uploads/2009/11/pic.jpg" alt="pic" width="401" height="253" /> <br />技巧三： <br />如果你将你的项目发布到Portal环境下，相对路径的URL都会进行转发，也就是说所有使用相对路径加载外部资源的都会失效，那么你就需要把你的swz文件放在一台http server上进行远程加载</p>
<p><img class="alignnone size-full wp-image-99" title="pic2" src="http://www.flexers.cn/wordpress/wp-content/uploads/2009/11/pic2.jpg" alt="pic2" width="415" height="499" /></p>
<p><span id="more-97"></span></p>
<p>技巧4：有些同学希望playerglobal.swc,flex.swx,utilites.swc这些包也分离出去，但是这些包是没有经过adobe 签名的，是不能常驻硬盘的，也就说他们生成不了swz文件，只能生成swf，他们可能会存在缓存中，但是当计算机重启或者浏览器关闭这些下载过一次外部类 包可能就需要重新下载了，总的来说是得不偿失的。</p>
<p>技巧5：再补充一点，自定义的swc文件，生成后都是500k打底的，发布的时候要选择 merged into code这样其实只占工程文件的大小（20k左右），adobe不会傻到把一些公共类包重复编译（之前一直以为他会重复编译）。所以自定义的swc就不要 去整什么RSL了。</p>
<p>十分感谢 <a href="http://bbs.airia.cn/space/12132.aspx" target="_blank">jinni.cao</a> 的补充和纠正</p>
<p>1.playerglobal.swc是Flash Player API，由Flash Player提供，所以任何时候都不需要做RSL <br />2.签名的SWZ由Flash Player缓存，非签名的SWF由浏览器缓存，取决于浏览器的自身的工作方式和用户设置，并不是&#8221;计算机重启或者浏览器关闭这些就需要重新下载了&#8221; <br />3.即使SWF不能被缓存，也未见得是&#8221;得不偿失&#8221;，这取决于你的需求，在某些情况下，RSL即使没有缓存这方面的能力也一样可以节省下载量。 <br />4. &#8220;再补充一点，自定义的swc文件，生成后都是500k打底的&#8221; <br />swc文件的大小取决于你的类的大小，你放一个简单的自定义类到RSL试试，只有几百个字节。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=97</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>开源项目as3wordpresslib测试版发布</title>
		<link>http://www.flexers.cn/wordpress/?p=90</link>
		<comments>http://www.flexers.cn/wordpress/?p=90#comments</comments>
		<pubDate>Fri, 06 Nov 2009 09:13:03 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[framework]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=90</guid>
		<description><![CDATA[写在前面的话： 艾睿原创团队群的讨论时给我的灵 感，as3wordpresslib项目从7月份开始勾划，当中由于工作原因搁置了2个月，其实实际的开发时间也就只有短短2周左右，由于需要筹备婚事， 我感觉今后几个月之内不能全力support这个项目，但是不想让项目夭折，所以选择今天把这个完成度90%的项目发布出来，希望感兴趣的朋友能学习它， 使用它，完善它，推广它。 项目简介 什么是as3wordpresslib？ as3wordpresslib 是一套as3类库，这套类库实现了wordpress 2.8中基于xmlrpc的service接口。flex/flash开发人员利用这套类库就可以轻易的访问wordpress后台，而把注意力集中在打 造自己的个性化Blog UI。 使用as3wordpresslib你可以做些什么？ 1. 使用Flex/Flash技术，实现blog的UI，打造个性化blog。 2. 使用Flex/AIR技术,实现blog离线撰写发布程序。 开发as3wordpresslib的目的？ 1. 使得希望学习flex/flash开发而又缺少后台支持的初级程序员可以迅速方便的focus在自己感兴趣的领域。（其实这是本project的真正目 的，希望每个初学者都可以毫无后顾之忧的使用as3wordpresslib写出自己第一个真正意义上的Hello World ） 2. 希望能带动其他的Flexers能和我一起做些虽然看似dirty work但是对于Flex应用推广和发展却有较大帮助的公益劳动。 为什么选择WordPress作为Blog后台 1. wordpress 目前非常火热，大部分技术人员都拥有自己的wordpress blog。（良好的群众基础） 2. wordpress 更新迅速，支持用户自定义插件皮肤，这正是Flex项目在开发中需要考虑的问题。 项目计划 * xmlrpc协议学习 * 开发环境搭建 * 开发架构搭建 * wordpress xmlrpc api接口定义 * wordpress xmlrpc api具体实现 * 接口测试 * 接口asdoc comments 撰写 [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: large;"><strong>写在前面的话：</strong></span><br />
艾睿原创团队群的讨论时给我的灵 感，as3wordpresslib项目从7月份开始勾划，当中由于工作原因搁置了2个月，其实实际的开发时间也就只有短短2周左右，由于需要筹备婚事， 我感觉今后几个月之内不能全力support这个项目，但是不想让项目夭折，所以选择今天把这个完成度90%的项目发布出来，希望感兴趣的朋友能学习它， 使用它，完善它，推广它。</p>
<p><span style="font-size: large;"><strong>项目简介</strong></span></p>
<p><strong>什么是as3wordpresslib？</strong></p>
<p>as3wordpresslib 是一套as3类库，这套类库实现了wordpress 2.8中基于xmlrpc的service接口。flex/flash开发人员利用这套类库就可以轻易的访问wordpress后台，而把注意力集中在打 造自己的个性化Blog UI。</p>
<p><strong>使用as3wordpresslib你可以做些什么？</strong></p>
<p>1. 使用Flex/Flash技术，实现blog的UI，打造个性化blog。<br />
2. 使用Flex/AIR技术,实现blog离线撰写发布程序。</p>
<p><strong>开发as3wordpresslib的目的？</strong></p>
<p>1. 使得希望学习flex/flash开发而又缺少后台支持的初级程序员可以迅速方便的focus在自己感兴趣的领域。（其实这是本project的真正目 的，希望每个初学者都可以毫无后顾之忧的使用as3wordpresslib写出自己第一个真正意义上的Hello World ）<br />
2. 希望能带动其他的Flexers能和我一起做些虽然看似dirty work但是对于Flex应用推广和发展却有较大帮助的公益劳动。</p>
<p><strong>为什么选择WordPress作为Blog后台</strong></p>
<p>1. wordpress 目前非常火热，大部分技术人员都拥有自己的wordpress blog。（良好的群众基础）<br />
2. wordpress 更新迅速，支持用户自定义插件皮肤，这正是Flex项目在开发中需要考虑的问题。</p>
<p><span id="more-90"></span></p>
<p><strong>项目计划</strong></p>
<p>* xmlrpc协议学习<br />
* 开发环境搭建<br />
* 开发架构搭建<br />
* wordpress xmlrpc api接口定义<br />
* wordpress xmlrpc api具体实现<br />
* 接口测试<br />
* 接口asdoc comments 撰写<br />
* Demo编写<br />
* Guide撰写<br />
* 宣传与发布<br />
* bug征集<br />
* 升级维护</p>
<p><strong>最新近况：</strong></p>
<p>2009-08-04:API Reference Document及类包aswplib.swc已经发布（Download面板有下），邀请了艾睿原创团队的一些朋友先进行内测。<br />
2009-08-03:接口的asdoc和api实现基本都已完成，除了少数几个only for AIR以及在测试过程中没有调通的接口。接下来就开始着手准备Demo，在实际开发中去解决上个阶段没有完成的一些遗留问题。<br />
<strong><span style="font-size: large;">参考资料</span></strong></p>
<ul>
<li><a href="http://www.xmlrpc.com/" target="_blank">xmlrpc协议</a></li>
<li><a href="http://codex.wordpress.org/XML-RPC_wp" target="_blank">WordPress xmlrpc api</a></li>
<li><a href="http://danielmclaren.net/2007/08/03/xmlrpc-for-actionscript-30-free-library" target="_blank">XMLRPC for Actionscript 3.0 &#8211; Free Library</a></li>
<li><a href="http://wordpress.org/" target="_blank">WordPress</a></li>
</ul>
<p><span style="font-size: large;"><strong>项目地址：</strong></span><br />
<a href="http://code.google.com/p/as3wordpresslib/" target="_blank"><span style="font-size: small;">http://code.google.com/p/as3wordpresslib/</span></a><br />
<strong>SVN地址（含lib和FB4版最佳实践源码）：<br />
</strong><a href="http://as3wordpresslib.googlecode.com/svn/trunk/" target="_blank"><span style="font-size: small;"><strong>http</strong>://as3wordpresslib.googlecode.com/svn/trunk/</span></a><br />
<span style="font-size: large;"><strong>接口完成情况</strong></span>：<br />
<span style="font-size: small;"><strong>WordPress API</strong></span></p>
<table border="0">
<tbody>
<tr>
<td>No.</td>
<td>operation name</td>
<td>interface</td>
<td>implement</td>
<td>asdoc</td>
<td>assigner</td>
<td>remark</td>
</tr>
<tr>
<td>1</td>
<td>getUsersBlogs</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>2</td>
<td>getTags</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>3</td>
<td>getCommentCount</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>4</td>
<td>getPostStatusList</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>5</td>
<td>getPageStatusList</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>6</td>
<td>getPageTemplates</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>7</td>
<td>getOptions</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>8</td>
<td>setOptions</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>9</td>
<td>deleteComment</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>10</td>
<td>editComment</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>11</td>
<td>newComment</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>12</td>
<td>getCommentStatusList</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>13</td>
<td>getPage</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>14</td>
<td>getPages</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>15</td>
<td>getPageList</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>16</td>
<td>newPage</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>17</td>
<td>deletePage</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>18</td>
<td>editPage</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>19</td>
<td>getAuthors</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>20</td>
<td>getCategories</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>21</td>
<td>newCategory</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>22</td>
<td>deleteCategory</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>23</td>
<td>suggestCategories</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>24</td>
<td>uploadFile</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>only for AIR 未测试</td>
</tr>
<tr>
<td>25</td>
<td>getComment</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>26</td>
<td>getComments</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
</tbody>
</table>
<p><strong> </strong></p>
<p><span style="font-size: small;"><strong><strong>Blogger API</strong></strong></span><strong><strong> </strong></strong></p>
<p><strong><strong> </strong></strong></p>
<table border="0">
<tbody>
<tr>
<td>No.</td>
<td>operation name</td>
<td>interface</td>
<td>implement</td>
<td>asdoc</td>
<td>assigner</td>
<td>remark</td>
</tr>
<tr>
<td>1</td>
<td>getUsersBlogs</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>2</td>
<td>getUserInfo</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>3</td>
<td>getPost</td>
<td>/</td>
<td>/</td>
<td></td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>4</td>
<td>getRecentPosts</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>5</td>
<td>getTemplate</td>
<td>/</td>
<td>/</td>
<td></td>
<td>momoko</td>
<td>该接口不能正常工作</td>
</tr>
<tr>
<td>6</td>
<td>setTemplate</td>
<td>/</td>
<td>/</td>
<td></td>
<td>momoko</td>
<td>该接口不能正常工作</td>
</tr>
<tr>
<td>7</td>
<td>newPost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>8</td>
<td>editPost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>9</td>
<td>deletePost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
</tbody>
</table>
<p><strong><strong> </strong></strong></p>
<p><span style="font-size: small;"><strong><strong><strong>MetaWeblog<a href="http://code.google.com/p/as3wordpresslib/w/edit/MetaWeblog" target="_blank">?</a> API</strong></strong></strong></span></p>
<p><strong><strong> </strong></strong></p>
<table border="0">
<tbody>
<tr>
<td>No.</td>
<td>operation name</td>
<td>interface</td>
<td>implement</td>
<td>asdoc</td>
<td>assigner</td>
<td>remark</td>
</tr>
<tr>
<td>1</td>
<td>newPost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>2</td>
<td>editPost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>3</td>
<td>getPost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>4</td>
<td>getRecentPosts</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>5</td>
<td>getCategories</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>6</td>
<td>newMediaObject</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>only for AIR 未测试</td>
</tr>
<tr>
<td>7</td>
<td>deletePost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>8</td>
<td>getTemplate</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>底层实现调用了BloggerService<a href="http://code.google.com/p/as3wordpresslib/w/edit/BloggerService" target="_blank">?</a>接口 不能工作</td>
</tr>
<tr>
<td>9</td>
<td>setTemplate</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>底层实现调用了BloggerService<a href="http://code.google.com/p/as3wordpresslib/w/edit/BloggerService" target="_blank">?</a>接口 不能工作</td>
</tr>
<tr>
<td>10</td>
<td>getUsersBlogs</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
</tbody>
</table>
<p><strong><strong> </strong></strong></p>
<p><span style="font-size: small;"><strong><strong><strong>MovableType<a href="http://code.google.com/p/as3wordpresslib/w/edit/MovableType" target="_blank">?</a> API</strong></strong></strong></span></p>
<p><strong><strong> </strong></strong></p>
<table border="0">
<tbody>
<tr>
<td>No.</td>
<td>operation name</td>
<td>interface</td>
<td>implement</td>
<td>asdoc</td>
<td>assigner</td>
<td>remark</td>
</tr>
<tr>
<td>1</td>
<td>getCategoryList</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>2</td>
<td>getRecentPostTitles</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>3</td>
<td>getPostCategories</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>4</td>
<td>setPostCategories</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>5</td>
<td>supportedMethods</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
<tr>
<td>6</td>
<td>supportedTextFilters</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>测试时无返回结果，待进一步验证</td>
</tr>
<tr>
<td>7</td>
<td>getTrackbackPings</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>测试时无返回结果，待进一步验证</td>
</tr>
<tr>
<td>8</td>
<td>publishPost</td>
<td>/</td>
<td>/</td>
<td>/</td>
<td>momoko</td>
<td>完成</td>
</tr>
</tbody>
</table>
<p><strong><strong> </strong></strong></p>
<p><strong><strong><strong><br />
</strong></strong></strong></p>
<p><span style="font-size: large;"><strong><strong>as3wordpresslib api用户指南</strong></strong></span></p>
<p><strong> </strong>1 在本站“Downloads”下载as3wplib.swc（目前发布的1.0版本只支持Flex 4 SDK，以后会发布 SDK 3的版本）<br />
2 在项目中导入swc类包<br />
* 在FlashBuilder? 4中对新建的项目点击右键，选择“Properties”<br />
* 在弹出面板左侧选择“Flex Build Path”一栏，在相应的右侧面板中选择“Library path” tab<br />
* 点击“Add SWC”按钮导入之前下载的as3wplib.swc</p>
<p>3 为项目配置wordpress的xmlrpc地址（仅针对Flex 4 SDK，Flex3和flash的配置flashvars方法请自行google）<br />
* 打开项目目录中的“html-template”文件夹下的“index.template.html”文件<br />
* 对38行附近代码作如下修改，增加一个属性 flashvars.wp_xmlrpc，其指向的就是wordpress的xmlrpc地址。</p>
<p>var xiSwfUrlStr = &#8220;${expressInstallSwf}&#8221;;<br />
var flashvars = {};<br />
flashvars.wp_xmlrpc = &#8220;http://127.0.0.1/wordpress/xmlrpc.php&#8221;;<br />
var params = {};<br />
params.quality = &#8220;high&#8221;;</p>
<p>4 WordPress提供的API每一处调用都需要传递用户名密码，这么做对于我们使用Flex制作Blog UI来说非常不便，因为Flex不能load本地文件，这对于账号配置来说是非常不安全的，幸好WordPress提供个几种角色，我们只需配置一个只读 角色给API即可。<br />
* 使用管理员账号登陆WordPress，在User管理处新增一个Subscriber（订阅者）账号，这个账号只有只读权限。<br />
* 同样使用flashvars方式，将Subscriber用户名密码配置在这里</p>
<p>var xiSwfUrlStr = &#8220;${expressInstallSwf}&#8221;;<br />
var flashvars = {};<br />
flashvars.wp_xmlrpc = &#8220;http://127.0.0.1/wordpress/xmlrpc.php&#8221;;<br />
flashvars.username = &#8220;Subscriber&#8221;;<br />
flashvars.password= &#8220;123456&#8243;;<br />
var params = {};<br />
params.quality = &#8220;high&#8221;;</p>
<p>5 WordPress中的API有一点让我很费解，就是某些get操作也需要写权限，这样的话，我们配置的Subscriber账号就无法访问这些API， 我只好hack一些WordPress里xmlrpc.php中的代码了，将一些不合理接口的写权限验证给注释掉。（由于我现在无法统计出所有的不合情理 的借口，所以请使用尝鲜版的用户自行注释，以后我会给出我修改好的xmlrpc.php文件，用户只需替换即可）</p>
<p>* 注释方法以getCategories()方法为例注释 2786两行即可。<br />
//if( !current_user_can( &#8216;edit_posts&#8217; ) )<br />
// return new IXR_Error( 401, ( &#8216;Sorry, you must be able to edit posts on this blog in order to view categories.&#8217; ) );</p>
<p>6 在你的AS3代码第一次调用as3wplib之前，配置xmlrpc的路径<br />
Flex4：Configuration.getInstance().xmlrpcUrl = FlexGlobals?.topLevelApplication.parameters["wp_xmlrpc"];<br />
Flex3：Configuration.getInstance().xmlrpcUrl = Application.application.parameters["wp_xmlrpc"];<br />
Flash：Configuration.getInstance().xmlrpcUrl = LoaderInfo?（this.root.loaderInfo）.application.parameters["wp_xmlrpc"];<br />
<span style="font-size: large;"><strong>鸣谢：</strong></span><br />
艾睿原创群给予意见和帮助的朋友，特别是陆仕桑同学和kenshin</p>
<p><span style="font-size: large;"><strong>备注</strong>：</span><br />
这是我修改的<a href="http://www.flexers.cn/wordpress/wp-content/uploads/2009/11/xmlrpc.zip" target="_blank">xmrpc.php</a>，不过只修改了几个主要接口，同学们可以自行根据Guide上的提示自行修改<br />
最佳实践测试截图</p>
<p><img class="alignnone size-full wp-image-91" title="aslib" src="http://www.flexers.cn/wordpress/wp-content/uploads/2009/11/aslib.jpg" alt="aslib" width="966" height="847" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=90</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一个Flex3er学Flex4(2)——Groups vs Canvas</title>
		<link>http://www.flexers.cn/wordpress/?p=89</link>
		<comments>http://www.flexers.cn/wordpress/?p=89#comments</comments>
		<pubDate>Wed, 05 Aug 2009 07:32:20 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[Flex4]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[Groups]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=89</guid>
		<description><![CDATA[这篇日志会维护Flex4中的Groups和Flex3中的Canvas的不同点，发现一点写一点。 正好艾睿论坛上有人问道这个问题。 Canvas中要设置它的背景和边框是十分容易的 &#60;mx:Canvas backgroundColor=&#8221;#000000&#8243; borderStyle=&#8221;solid&#8221; borderColor=&#8221;#FFFFFF&#8221; /&#62; Groups中则比较复杂了。 &#60;s:Group xmlns:fx=&#8221;http://ns.adobe.com/mxml/2009&#8221; xmlns:s=&#8221;library://ns.adobe.com/flex/spark&#8221; xmlns:mx=&#8221;library://ns.adobe.com/flex/halo&#8221; height=&#8221;100&#8243; width=&#8221;600&#8243;&#62; &#60;s:Rect width=&#8221;100%&#8221; height=&#8221;100%&#8221;&#62; &#60;s:stroke&#62; &#60;s:Stroke color=&#8221;0&#215;000000&#8243; weight=&#8221;.5&#8243; /&#62; &#60;/s:stroke&#62; &#60;s:fill&#62; &#60;s:SolidColor color=&#8221;yellow&#8221;/&#62; &#60;/s:fill&#62; &#60;/s:Rect&#62; &#60;mx:Label x=&#8221;24&#8243; y=&#8221;21&#8243; text=&#8221;Label&#8221; color=&#8221;#000000&#8243;/&#62; &#60;/s:Group&#62;]]></description>
			<content:encoded><![CDATA[<p>这篇日志会维护Flex4中的Groups和Flex3中的Canvas的不同点，发现一点写一点。</p>
<p>正好艾睿论坛上有人问道这个问题。</p>
<p>Canvas中要设置它的背景和边框是十分容易的</p>
<p>&lt;mx:Canvas backgroundColor=&#8221;#000000&#8243; borderStyle=&#8221;solid&#8221; borderColor=&#8221;#FFFFFF&#8221; /&gt;</p>
<p>Groups中则比较复杂了。</p>
<p>&lt;s:Group xmlns:fx=&#8221;<a href="http://ns.adobe.com/mxml/2009">http://ns.adobe.com/mxml/2009</a>&#8221; xmlns:s=&#8221;library://ns.adobe.com/flex/spark&#8221; xmlns:mx=&#8221;library://ns.adobe.com/flex/halo&#8221; <br/>height=&#8221;100&#8243; width=&#8221;600&#8243;&gt; <br/>&lt;s:Rect width=&#8221;100%&#8221; height=&#8221;100%&#8221;&gt; <br/>&lt;s:stroke&gt; <br/>&lt;s:Stroke color=&#8221;0&#215;000000&#8243; weight=&#8221;.5&#8243; /&gt; <br/>&lt;/s:stroke&gt; <br/>&lt;s:fill&gt; <br/>&lt;s:SolidColor color=&#8221;yellow&#8221;/&gt; <br/>&lt;/s:fill&gt; <br/>&lt;/s:Rect&gt; <br/>&lt;mx:Label x=&#8221;24&#8243; y=&#8221;21&#8243; text=&#8221;Label&#8221; color=&#8221;#000000&#8243;/&gt; <br/>&lt;/s:Group&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=89</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>一个Flex3er学Flex4(1) ——加载启动参数flashvar</title>
		<link>http://www.flexers.cn/wordpress/?p=87</link>
		<comments>http://www.flexers.cn/wordpress/?p=87#comments</comments>
		<pubDate>Wed, 05 Aug 2009 07:08:53 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[Flex4]]></category>
		<category><![CDATA[flashvars]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=87</guid>
		<description><![CDATA[flex3中的做法是在html-template下修改index.template.html如下 AC_FL_RunContent( &#8220;src&#8221;, &#8220;${swf}&#8221;, &#8220;width&#8221;, &#8220;${width}&#8221;, &#8220;height&#8221;, &#8220;${height}&#8221;, &#8220;align&#8221;, &#8220;middle&#8221;, &#8220;id&#8221;, &#8220;${application}&#8221;, &#8220;quality&#8221;, &#8220;high&#8221;, &#8220;bgcolor&#8221;, &#8220;${bgcolor}&#8221;, &#8220;name&#8221;, &#8220;${application}&#8221;, &#8220;allowScriptAccess&#8221;,&#8221;sameDomain&#8221;, &#8220;type&#8221;, &#8220;application/x-shockwave-flash&#8221;, &#8220;pluginspage&#8221;, &#8220;http://www.adobe.com/go/getflashplayer&#8220;, &#8220;flashvars&#8221;,&#8221;id=913092672&#8243; ); 然后在as3中使用Application.application.parameters["id"]来调用 Flex4中的设置方法有所改变，还是index.template.html,设置如下 &#60;script type=&#8221;text/javascript&#8221;&#62; &#60;!&#8211; For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. &#8211;&#62; var swfVersionStr = &#8220;${version_major}.${version_minor}.${version_revision}&#8221;; &#60;!&#8211; To [...]]]></description>
			<content:encoded><![CDATA[<p>flex3中的做法是在html-template下修改index.template.html如下</p>
<p>AC_FL_RunContent( <br/>&#8220;src&#8221;, &#8220;${swf}&#8221;, <br/>&#8220;width&#8221;, &#8220;${width}&#8221;, <br/>&#8220;height&#8221;, &#8220;${height}&#8221;, <br/>&#8220;align&#8221;, &#8220;middle&#8221;, <br/>&#8220;id&#8221;, &#8220;${application}&#8221;, <br/>&#8220;quality&#8221;, &#8220;high&#8221;, <br/>&#8220;bgcolor&#8221;, &#8220;${bgcolor}&#8221;, <br/>&#8220;name&#8221;, &#8220;${application}&#8221;, <br/>&#8220;allowScriptAccess&#8221;,&#8221;sameDomain&#8221;, <br/>&#8220;type&#8221;, &#8220;application/x-shockwave-flash&#8221;, <br/>&#8220;pluginspage&#8221;, &#8220;<a href="http://www.adobe.com/go/getflashplayer">http://www.adobe.com/go/getflashplayer</a>&#8220;, <br/><span style="COLOR: #ff0000">&#8220;flashvars&#8221;,&#8221;id=913092672&#8243;</span> <br/>);</p>
<p>然后在as3中使用Application.application.parameters["id"]来调用</p>
<p>Flex4中的设置方法有所改变，还是index.template.html,设置如下</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt; <br/>&lt;!&#8211; For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. &#8211;&gt; <br/>var swfVersionStr = &#8220;${version_major}.${version_minor}.${version_revision}&#8221;; <br/>&lt;!&#8211; To use express install, set to playerProductInstall.swf, otherwise the empty string. &#8211;&gt; <br/>var xiSwfUrlStr = &#8220;${expressInstallSwf}&#8221;; <br/>var flashvars = {}; <br/>flashvars.id= &#8220;<span style="COLOR: #ff0000">913092672</span>&#8220;; <br/>var params = {}; <br/>params.quality = &#8220;high&#8221;; <br/>params.bgcolor = &#8220;${bgcolor}&#8221;; <br/>params.allowscriptaccess = &#8220;sameDomain&#8221;; <br/>params.allowfullscreen = &#8220;true&#8221;; <br/>var attributes = {}; <br/>attributes.id = &#8220;${application}&#8221;; <br/>attributes.name = &#8220;${application}&#8221;; <br/>attributes.align = &#8220;middle&#8221;; <br/>swfobject.embedSWF( <br/>&#8220;${swf}.swf&#8221;, &#8220;flashContent&#8221;, <br/>&#8220;${width}&#8221;, &#8220;${height}&#8221;, <br/>swfVersionStr, xiSwfUrlStr, <br/>flashvars, params, attributes); <br/>&lt;!&#8211; JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. &#8211;&gt; <br/>swfobject.createCSS(&#8220;#flashContent&#8221;, &#8220;display:block;text-align:left;&#8221;); <br/>&lt;/script&gt;</p>
<p>在as3中调用方式也发生了改变</p>
<p>FlexGlobals.topLevelApplication.parameters["id"]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=87</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>转:《Flex 4 &amp; Flash Builder 4 快速入门》正式发布</title>
		<link>http://www.flexers.cn/wordpress/?p=84</link>
		<comments>http://www.flexers.cn/wordpress/?p=84#comments</comments>
		<pubDate>Fri, 26 Jun 2009 06:17:16 +0000</pubDate>
		<dc:creator>momoko8443</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[中文教程]]></category>

		<guid isPermaLink="false">http://www.flexers.cn/wordpress/?p=84</guid>
		<description><![CDATA[目 录 （图书目录已编入PDF&#8221;书签&#8221;栏） 第一章 Flash Builder 4 背景 1.1 从Flex Builder到Flash Builder 第二章 Flash Builder 4 界面 2.1 主界面 2.2 主菜单 2.3 工具条 2.4 主要窗口 第三章 Flash Builder 4 新特性 3.1 Package explorer 3.2 悬停时的ASDOC提示 3.3 Getter &#38; Setter 3.4 自动生成EventHandler 3.5 条件断点 第四章 Flex SDK 4 新特性 4.1 主题 4.2 布局 4.3 特效 4.4 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.flexers.cn/wordpress/wp-content/uploads/2009/06/mb.jpg" style="DISPLAY: inline" height="582" width="470"/></p>
<p><strong><span style="FONT-SIZE: 1.5em">目 录</span> <span style="COLOR: #666666"><span style="FONT-SIZE: 0.9em">（图书目录已编入PDF&#8221;书签&#8221;栏）</span></span></strong> <br/><br/><strong>第一章 Flash Builder 4 背景 <br/><br/></strong> <span style="COLOR: #666666">1.1 从Flex Builder到Flash Builder <br/><br/></span> <strong>第二章 Flash Builder 4 界面 <br/></strong> <span style="COLOR: #666666">2.1 主界面 <br/>2.2 主菜单 <br/>2.3 工具条 <br/>2.4 主要窗口</span> <br/><strong><br/>第三章 Flash Builder 4 新特性 <br/></strong> <span style="COLOR: #666666">3.1 Package explorer <br/>3.2 悬停时的ASDOC提示 <br/>3.3 Getter &amp; Setter <br/>3.4 自动生成EventHandler <br/>3.5 条件断点 <br/><br/></span> <strong>第四章 Flex SDK 4 新特性 <br/></strong> <span style="COLOR: #666666">4.1 主题 <br/>4.2 布局 <br/>4.3 特效 <br/>4.4 样式 <br/>4.5 状态 <br/>4.6 双向绑定 <br/>4.7 ASDoc <br/>4.8 SWFObject 与 HTML Template</span> <strong><br/><br/>第五章 自定义组件开发 <br/><br/></strong> <span style="COLOR: #666666">5.1 自定义Flex组件 <br/>5.2 MXML组件开发 <br/>5.3 ActionScript组件开发</span> <strong><br/><br/>第六章 与服务端通信 <br/><br/></strong> <span style="COLOR: #666666">6.1 通过Http Service与服务端通信 <br/>6.2 通过Web Service与服务端通信 <br/>6.3 通过Remoting与服务端通信 <br/>6.4 与Flash Media Server交互</span> <strong><span style="FONT-SIZE: 1.2em"><br/><br/><br/>《Flash Builder 4 快速入门》内容简介 <br/><br/></span></strong> 在Adobe发布Flash Builder 4后，<a href="http://www.airia.cn/">艾睿</a>论坛 （bbs.airia.cn）编辑团队协作完成了这部教学。 《Flash Builder 4 快速入门》6月25日正式发布第一个版本，今后还会根据读者需要进行更新。 <br/><br/><strong><span style="FONT-SIZE: 1.2em"><span style="FONT-SIZE: 1em">本书适合谁读？</span></span></strong> <br/><br/>《Flash Builder 4 快速入门》除了适合想学习FLEX开发和正在学习FLEX开发的朋友，也广泛适用与FLASH、 Actionscript开发者进行转型和深入学习。包括.NET、JAVA开发人员在内，这本书都将为你日后的含RIA开发工作奠定牢固的知识基础。 <span style="FONT-SIZE: 1em"><strong><br/><br/>章节简介： <br/><br/></strong></span> 本书1-2章主要为新接触FLEX开发的朋友提供入门帮助，以图文并茂的方式从零基础开始指引新手走进 FLEX开发，如果是有一定基础的FLEX开发者，这两章可以简单翻阅。3-5章开始进阶学习， 介绍FB4 / FLEX SDK 4 新特性与开发实例，适合绝大多数的FLEX开发者阅读。 第6章为通信服务方面的必备知识，这一章以实际案例的方式展示了FLEX与服务端通信的4种方式。 <strong><span style="FONT-SIZE: 1em"><br/><br/>本书作者： <br/><br/></span></strong> 本书凝聚了艾睿编辑团队各位作者的大量心血，以下是参与本书编辑的作者，如果你在阅读的期间遇到问题也可以进入<a href="http://www.airia.cn/flashbuilder">Flash Builder</a>快速入门专栏联系作者，或进入作者的博客与其交流。 <br/><br/>他们分别是（排名不分先后）： <br/><br/></p>
<table width="100%" cellspacing="1" border="1">
<tbody>
<tr>
<td>罗楷 <br/>http://www.flextheworld.com <br/>kevin.luo.sl@gmail.com <br/><br/>郭峰 <br/>http://www.hydra1983.com <br/>Edison@airia.cn <br/><br/>郑会宾 <br/>http://www.flexers.cn <br/>momoko8443@163.com</td>
<td>唐凡 <br/>http://www.tangfanzone.com <br/>woodytf@sina.com <br/><br/>陆仕桑 <br/>http://lushisang.com <br/>lushisang@gmail.com <strong><br/></strong></td>
</tr>
</tbody>
</table>
<p><br/><strong><br/>《Flash Builder 4 快速入门》专栏： <br/></strong> <a href="http://www.airia.cn/flashbuilder/">http://www.airia.cn/flashbuilder/</a> <strong><br/><br/>《Flash Builder 4快速入门 》PDF、源码包 下载页：</strong> <a href="http://www.airia.cn/flashbuilder/fb4Qbook/source/"><br/><br/>http://www.airia.cn/flashbuilder/fb4Qbook/source/</a> <strong><br/><br/>下载 Adobe Reader 9 阅读器: <br/></strong> <br/>下载地址<a href="http://www.onlinedown.net/soft/2696.htm">http://www.onlinedown.net/soft/2696.htm <br/></a> <strong><span style="FONT-SIZE: 1.2em"><br/><br/>本帖（以上内容）欢迎大家踊跃转载。让更多的朋友顺利走入FLEX开发。 <br/><br/><br/>FQA： <br/><br/></span></strong> <strong><span style="COLOR: #0033ff">为什么我打开需要密码？</span></strong> <br/><br/>编辑团队对PDF的&#8221;修改权限&#8221;设置了密码，我们希望可以保证该文档的完整性、安全性，不希望文档被任意篡改,最终目的是为了保障读者权益。但这并不影响阅读和学习，通常低版本的<strong>Adobe Reader 会报出需要密码，请使用 Adobe Reader 9 阅读器。</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexers.cn/wordpress/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
