<?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>IT妖怪 &#187; Adobe Flex</title>
	<atom:link href="http://blog.ityao.com/archives/tag/flex/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.ityao.com</link>
	<description>热爱生活，热爱程序</description>
	<lastBuildDate>Wed, 03 Aug 2011 02:56:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>使用RSL发布flex项目需要的build.xml要诀详解</title>
		<link>http://blog.ityao.com/archives/751</link>
		<comments>http://blog.ityao.com/archives/751#comments</comments>
		<pubDate>Fri, 09 Jul 2010 13:04:16 +0000</pubDate>
		<dc:creator>Silver</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[ADOBE RIA]]></category>
		<category><![CDATA[ANT]]></category>
		<category><![CDATA[VerifyError]]></category>

		<guid isPermaLink="false">http://blog.ityao.com/?p=751</guid>
		<description><![CDATA[遇到了一个ANT编译后不能正常发布使用的问题，于是花了两天（人比较呆）去研究，研究得这么辛苦，当然要把心得写下来，对于ADOBE貌似详细，但语蔫不详的文档作风很是失望! 在此感谢此文作者：http://www.kahunaburger.com/2009/04/08/flash-player-verifyerror-error-1014-with-rsls/ 给了我解决问题的思路 要是用flash build 4.1自带的flex 4.1的sdk的flex-config.xml记得更新里面的默认编译FP版本为10.1,否则还是10.0的 build.properties文件 build.xml文件]]></description>
			<content:encoded><![CDATA[<p>遇到了一个ANT编译后不能正常发布使用的问题，于是花了两天（人比较呆）去研究，研究得这么辛苦，当然要把心得写下来，对于ADOBE貌似详细，但语蔫不详的文档作风很是失望!<br />
在此感谢此文作者：http://www.kahunaburger.com/2009/04/08/flash-player-verifyerror-error-1014-with-rsls/<br />
给了我解决问题的思路</p>
<p>要是用flash build 4.1自带的flex 4.1的sdk的flex-config.xml记得更新里面的默认编译FP版本为10.1,否则还是10.0的</p>
<p>build.properties文件</p>
<pre class="brush: plain; title: ; notranslate">
#Flex SDK 路径
FLEX_HOME=G:\\flexsdk
#根目录
APP_ROOT=G:\\riasource\&#92;&#48;.trunk
#ANT 安装目录
ANT_HOME=D:\\tools\\apache-ant-1.8.0
#本地部署目录(wamp/www)
DEPLOY_DIR=E:/wamp/www/ihaveu2
</pre>
<p>build.xml文件</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;project name=&quot;Task Build Main Script&quot; default=&quot;build&quot; basedir=&quot;.&quot;&gt;
	&lt;!-- 加载全局properties --&gt;
	&lt;property file=&quot;../build.properties&quot; /&gt;
	&lt;!-- 源文件路径 --&gt;
	&lt;property name=&quot;SRC_DIR&quot; value=&quot;${basedir}/srcs&quot; /&gt;
	&lt;!-- assets路径 --&gt;
	&lt;property name=&quot;ASSETS_DIR&quot; value=&quot;${basedir}/assets&quot; /&gt;
	&lt;!-- config路径--&gt;
	&lt;property name=&quot;CONFIG_DIR&quot; value=&quot;${APP_ROOT}/main/config/locale&quot; /&gt;
	&lt;!-- 引入flexTasks.jar --&gt;
	&lt;taskdef resource=&quot;flexTasks.tasks&quot; classpath=&quot;${FLEX_HOME}/ant/lib/flexTasks.jar&quot; /&gt;
	&lt;taskdef resource=&quot;net/sf/antcontrib/antlib.xml&quot;&gt;
		&lt;classpath&gt;
			&lt;pathelement location=&quot;${ANT_HOME}/lib/ant-contrib-1.0b3&quot; /&gt;
		&lt;/classpath&gt;
	&lt;/taskdef&gt;

	&lt;!-- 优化和生成项目需要用到的RSL --&gt;
	&lt;target name=&quot;createRSL&quot;&gt;
		&lt;macrodef name=&quot;optimize-rsl&quot;&gt;
			&lt;attribute name=&quot;rsl-dir&quot; /&gt;
			&lt;attribute name=&quot;swc-dir&quot; /&gt;
			&lt;attribute name=&quot;swc-name&quot; /&gt;
			&lt;sequential&gt;
				&lt;unzip src=&quot;@{swc-dir}/@{swc-name}.swc&quot; dest=&quot;@{rsl-dir}&quot;&gt;
					&lt;patternset&gt;
						&lt;include name=&quot;library.swf&quot; /&gt;
					&lt;/patternset&gt;
				&lt;/unzip&gt;
				&lt;java jar=&quot;${FLEX_HOME}/lib/optimizer.jar&quot; fork=&quot;true&quot; failonerror=&quot;true&quot;&gt;
					&lt;jvmarg line=&quot;-ea -DAS3 -DAVMPLUS -Dflexlib=${FLEX_HOME}/frameworks -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false&quot; /&gt;
					&lt;arg line=&quot;'@{rsl-dir}/library.swf' --output '@{rsl-dir}/@{swc-name}.swf' --keep-as3-metadata='Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient,RemoteClass' &quot; /&gt;
				&lt;/java&gt;
				&lt;delete file=&quot;@{rsl-dir}/library.swf&quot; /&gt;
				&lt;java jar=&quot;${FLEX_HOME}/lib/digest.jar&quot; fork=&quot;true&quot; failonerror=&quot;true&quot;&gt;
					&lt;jvmarg line=&quot;-ea -DAS3 -DAVMPLUS -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false&quot; /&gt;
					&lt;arg line=&quot;--digest.rsl-file  @{rsl-dir}/@{swc-name}.swf --digest.swc-path  @{swc-dir}/@{swc-name}.swc&quot; /&gt;
				&lt;/java&gt;
			&lt;/sequential&gt;
		&lt;/macrodef&gt;		

		&lt;!--把项目依赖的swc变成我们需要的RSL文件--&gt;
		&lt;optimize-rsl rsl-dir=&quot;${DEPLOY_DIR}&quot; swc-dir=&quot;${APP_ROOT}/library/bins&quot; swc-name=&quot;ihaveuLib_magazine&quot; /&gt;
		&lt;optimize-rsl rsl-dir=&quot;${DEPLOY_DIR}&quot; swc-dir=&quot;${APP_ROOT}/library/bins&quot; swc-name=&quot;ihaveuLib_main&quot; /&gt;
		&lt;optimize-rsl rsl-dir=&quot;${DEPLOY_DIR}&quot; swc-dir=&quot;${APP_ROOT}/referenceLibs/bins&quot; swc-name=&quot;PureMVC_AS3_MultiCore_1_0_5&quot; /&gt;
		&lt;optimize-rsl rsl-dir=&quot;${DEPLOY_DIR}&quot; swc-dir=&quot;${APP_ROOT}/referenceLibs/bins&quot; swc-name=&quot;TweenLite&quot; /&gt;
	&lt;/target&gt;

	&lt;!-- 构建web项目  --&gt;
	&lt;target name=&quot;build&quot; depends=&quot;createRSL&quot; &gt;
		&lt;exec executable=&quot;svnversion&quot; outputproperty=&quot;revisionVersion&quot; /&gt;
		&lt;copy todir=&quot;${DEPLOY_DIR}&quot;&gt;
			&lt;fileset dir=&quot;${SRC_DIR}/web_runtime&quot;&gt;
				&lt;include name=&quot;**/**&quot; /&gt;
			&lt;/fileset&gt;
		&lt;/copy&gt;

		&lt;copy todir=&quot;${DEPLOY_DIR}/assets&quot;&gt;
			&lt;fileset dir=&quot;${ASSETS_DIR}/web_runtime&quot;&gt;
				&lt;include name=&quot;**/**&quot; /&gt;
			&lt;/fileset&gt;
			&lt;!--
			&lt;fileset dir=&quot;${ASSETS_DIR}/air_runtime&quot;&gt;
				&lt;include name=&quot;**/**&quot; /&gt;
			&lt;/fileset&gt;
			--&gt;
		&lt;/copy&gt;

		&lt;mxmlc file=&quot;${DEPLOY_DIR}/index.mxml&quot;&gt;
			&lt;!-- 方便可以进行远程debug --&gt;
			&lt;debug&gt;true&lt;/debug&gt;
			&lt;!-- 项目需要用到的locale名字，其中在SDK 4.1 里面framework locale目录zh_tw已经改成zh_TW,但千万别信，使用的时候还是要写成zh_tw --&gt;
			&lt;locale&gt;en_US&lt;/locale&gt;
			&lt;locale&gt;zh_CN&lt;/locale&gt;
			&lt;locale&gt;zh_tw&lt;/locale&gt;
			&lt;!--项目的多语言及配置文件目录--&gt;
			&lt;source-path path-element=&quot;${CONFIG_DIR}/en_US&quot; /&gt;
			&lt;source-path path-element=&quot;${CONFIG_DIR}/zh_CN&quot; /&gt;
			&lt;source-path path-element=&quot;${CONFIG_DIR}/zh_tw&quot; /&gt;
			&lt;!-- 依赖的flex 4.1框架的RSL, 注意：顺序不能乱！若不写这一段则会报错：VerifyError: Error #1014: 无法找到类 。估计是由于下面自己定义的RSL依赖次序被优先了 --&gt;
			&lt;runtime-shared-library-path path-element=&quot;${FLEX_HOME}/frameworks/libs/framework.swc&quot;&gt;
				&lt;url rsl-url=&quot;http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/framework_4.1.0.16076.swz&quot; policy-file-url=&quot;http://fpdownload.adobe.com/pub/swz/crossdomain.xml&quot;/&gt;
				&lt;url rsl-url=&quot;framework_4.1.0.16076.swz&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;runtime-shared-library-path path-element=&quot;${FLEX_HOME}/frameworks/libs/textLayout.swc&quot;&gt;
				&lt;url rsl-url=&quot;http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz&quot; policy-file-url=&quot;http://fpdownload.adobe.com/pub/swz/crossdomain.xml&quot;/&gt;
				&lt;url rsl-url=&quot;textLayout_1.1.0.604.swz&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;runtime-shared-library-path path-element=&quot;libs/osmf.swc&quot;&gt;
				&lt;url rsl-url=&quot;http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/osmf_flex.4.0.0.13495.swz&quot; policy-file-url=&quot;http://fpdownload.adobe.com/pub/swz/crossdomain.xml&quot;/&gt;
				&lt;url rsl-url=&quot;osmf_flex.4.0.0.13495.swz&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;runtime-shared-library-path path-element=&quot;${FLEX_HOME}/frameworks/libs/spark.swc&quot;&gt;
				&lt;url rsl-url=&quot;http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/spark_4.1.0.16076.swz&quot; policy-file-url=&quot;http://fpdownload.adobe.com/pub/swz/crossdomain.xml&quot;/&gt;
				&lt;url rsl-url=&quot;spark_4.1.0.16076.swz&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;runtime-shared-library-path path-element=&quot;${FLEX_HOME}/frameworks/libs/sparkskins.swc&quot;&gt;
				&lt;url rsl-url=&quot;http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/sparkskins_4.1.0.16076.swz&quot; policy-file-url=&quot;http://fpdownload.adobe.com/pub/swz/crossdomain.xml&quot;/&gt;
				&lt;url rsl-url=&quot;sparkskins_4.1.0.16076.swz&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;runtime-shared-library-path path-element=&quot;${FLEX_HOME}/frameworks/libs/rpc.swc&quot;&gt;
				&lt;url rsl-url=&quot;http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/rpc_4.1.0.16076.swz&quot; policy-file-url=&quot;http://fpdownload.adobe.com/pub/swz/crossdomain.xml&quot;/&gt;
				&lt;url rsl-url=&quot;rpc_4.1.0.16076.swz&quot; /&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;!-- 依赖的第三方RSL, 如果有依赖关系，则应该按照依赖次序 进行定义--&gt;
			&lt;runtime-shared-library-path path-element=&quot;${APP_ROOT}/referenceLibs/bins/PureMVC_AS3_MultiCore_1_0_5.swc&quot;&gt;
				&lt;url rsl-url=&quot;PureMVC_AS3_MultiCore_1_0_5.swf&quot; policy-file-url=&quot;&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;runtime-shared-library-path path-element=&quot;${APP_ROOT}/referenceLibs/bins/TweenLite.swc&quot;&gt;
				&lt;url rsl-url=&quot;TweenLite.swf&quot; policy-file-url=&quot;&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;		

			&lt;runtime-shared-library-path path-element=&quot;${APP_ROOT}/library/bins/ihaveuLib_main.swc&quot;&gt;
				&lt;url rsl-url=&quot;ihaveuLib_main.swf&quot; policy-file-url=&quot;&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;runtime-shared-library-path path-element=&quot;${APP_ROOT}/library/bins/ihaveuLib_magazine.swc&quot;&gt;
				&lt;url rsl-url=&quot;ihaveuLib_magazine.swf&quot; policy-file-url=&quot;&quot;/&gt;
			&lt;/runtime-shared-library-path&gt;
			&lt;!-- 指定哪些包是不需要编译进输出的swf, 不写这段会把框架打包进index.swf里面去 --&gt;
			&lt;external-library-path dir=&quot;${FLEX_HOME}/frameworks/libs&quot; append=&quot;true&quot;&gt;
				&lt;include name=&quot;*.swc&quot; /&gt;
				&lt;include name=&quot;air/*.swc&quot; /&gt;
			&lt;/external-library-path&gt;
		&lt;/mxmlc&gt;
	&lt;/target&gt;
&lt;/project&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/751/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex/FlashBuidler中批量添加Module</title>
		<link>http://blog.ityao.com/archives/562</link>
		<comments>http://blog.ityao.com/archives/562#comments</comments>
		<pubDate>Tue, 20 Apr 2010 05:30:28 +0000</pubDate>
		<dc:creator>Jack</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[批量]]></category>

		<guid isPermaLink="false">http://blog.ityao.com/?p=562</guid>
		<description><![CDATA[Flex中批量添加、删除module]]></description>
			<content:encoded><![CDATA[<p>传统的在Flex工程中添加Module的方法是：在FlashBuilder中右键工程目录-&gt;Porperties-&gt;Flex Modules, 然后就可以add/edit/remove需要的module了，</p>
<p>但问题 是无论添加多少module都要点击add按钮<strong><span style="color: #ff0000;">一个一个添加! <span style="color: #000000;"><span style="font-weight: normal;">像我们的项目一个demo就用了好几十个module，一个一个添加可要烦死了</span></span></span></strong></p>
<p>网上搜‘批量添加module’没有结果，于是自己琢磨了一下</p>
<p>原来module的配置信息就藏在工程目录下的.actionScriptProperties中（<em>PS:该文件在FB中是隐藏的，需要去文件目录中看）</em></p>
<p>.actionScriptProperties文件格式是xml的</p>
<p>module的配置信息就.actionScriptProperties文件中&lt;modules&gt;&lt;/modules&gt;标签中</p>
<p>例如我的是：</p>
<p>.actionScriptProperties</p>
<p>&#8230;</p>
<div id="_mcePaste">
<div id="_mcePaste">&lt;modules&gt;</div>
<div id="_mcePaste">&lt;module application=&#8221;src/index.mxml&#8221; destPath=&#8221;com/ihaveu/Module1.swf&#8221; optimize=&#8221;true&#8221; sourcePath=&#8221;src/com/ihaveu/Module1.mxml&#8221;/&gt;</div>
<div id="_mcePaste">&lt;module application=&#8221;src/index.mxml&#8221; destPath=&#8221;com/ihaveu/Module2.swf&#8221; optimize=&#8221;true&#8221; sourcePath=&#8221;src/com/ihaveu/Module2.mxml&#8221;/&gt;</div>
<div>&lt;/modules&gt;</div>
<div>&#8230;</div>
<div>在每个module对应其中一条&lt;module&gt;标签</div>
<h6>参数说明：</h6>
<div><span style="color: #888888;">sourcePath  指向了module的mxml源文件</span></div>
<div><span style="color: #888888;">destPath  指向了module编译后的swf位置</span></div>
<div><span style="color: #888888;">optimize  是boolean值，决定是否对module进行优化</span></div>
<div><span style="color: #888888;">application  指向要优化的主程序，仅在optimize=‘true’时有用</span></div>
<div></div>
</div>
<div>需要批量添加、删除module时只需要在这个文件中添加、删除对应的&lt;module&gt;，然后刷新一次工程即可</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/562/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend AMF使用总结-服务端</title>
		<link>http://blog.ityao.com/archives/430</link>
		<comments>http://blog.ityao.com/archives/430#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:35:23 +0000</pubDate>
		<dc:creator>Daniel Yang</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[amf]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://blog.ityao.com/?p=430</guid>
		<description><![CDATA[Zend Framework是php框架中的战斗机。各种功能应有尽有，没有的网上也能找到插件，helper, filter&#8230;.而对于这样庞大的框架，最重要的就是配置了。 最近我作了一些尝试，在Zend Framework下使用AMF。现在把一些主要点共享给大家。 Tip 1，项目结构 这是刚接触ZF的同学们最头疼的。网上众说纷纭，其实很简单。 ZF发布的时候，bin目录下带有几个可运行的命令文件（包含各种系统了）。直接运行就可以了。 在这里，我是这样使用的(Mac Osx): 运行后，就会得到一个类似于这样的目录结构。 这里有个提示，尽管你可以把Zend文件夹（ZF的主要库文件）copy到刚才生成项目目录下的library里，我还是建议，一个服务器上维持一个ZF lib，这样升级起来容易。 现在可以把web服务器的服务地址只想我们生成目录bravo的public&#8212;这样，用户只能访问这个piblic目录中的文件，而程序文件是在application目录的，主要是安全。 好，打开浏览器，按照你配置的url来访问，应该能看到一个ZF生成的简单页面了。 Tip 2 index.php配置 ZF生成的public目录中，有一个index.php文件。这个文件是ZF应用的入口。这里的配置，主要是一些常量和ZF lib的位置。 比如我就是这样配置的： Tip 3 配置文件 ZF生成的application.ini文件位于/application/configs/下, 这个目录也经常会放其他配置文件，如route，i18n等。 配置文件一定不能乱了。我们按照dev, prod两种环境来配置。 Tip 4 AMF 服务的编写 这个很简单。 不需要继承任何类。 顺便说说gateway的提供。ZF中，gateway是一个controller。里面的内容比较常规： Tip 5 Bootstrap 最主要的是初始化name space和数据库连接 Tip 6 Value Object的传输 最让我头疼的。我现在的做法是，不使用ZF的Model, 直接用DbAdapter. 所以，我在Model里定义的其实是VO. 定义一个Base: 那么， User的Model就是： 在从数据库中取得数据后： 下一篇我们说客户端-应该是很简单了。]]></description>
			<content:encoded><![CDATA[<p><a href="http://framework.zend.com/" target="_blank">Zend Framework</a>是php框架中的战斗机。各种功能应有尽有，没有的网上也能找到插件，helper, filter&#8230;.而对于这样庞大的框架，最重要的就是配置了。</p>
<p>最近我作了一些尝试，在Zend Framework下使用AMF。现在把一些主要点共享给大家。</p>
<p><span id="more-430"></span></p>
<p>Tip 1，项目结构<br />
这是刚接触ZF的同学们最头疼的。网上众说纷纭，其实很简单。<br />
ZF发布的时候，bin目录下带有几个可运行的命令文件（包含各种系统了）。直接运行就可以了。<br />
在这里，我是这样使用的(Mac Osx):</p>
<pre class="brush: bash; title: ; notranslate">
Yang:~ daniel$ ./zf.sh create project website
</pre>
<p>运行后，就会得到一个类似于这样的目录结构。<br />
<a href="http://blog.ityao.com/wp-content/uploads/2009/09/Screen-shot-2009-09-28-at-5.43.30-PM.png"><img src="http://blog.ityao.com/wp-content/uploads/2009/09/Screen-shot-2009-09-28-at-5.43.30-PM.png" alt="Screen shot 2009-09-28 at 5.43.30 PM" title="Screen shot 2009-09-28 at 5.43.30 PM" width="221" height="505" class="alignnone size-full wp-image-432" /></a></p>
<p>这里有个提示，尽管你可以把Zend文件夹（ZF的主要库文件）copy到刚才生成项目目录下的library里，我还是建议，一个服务器上维持一个ZF lib，这样升级起来容易。</p>
<p>现在可以把web服务器的服务地址只想我们生成目录bravo的public&#8212;这样，用户只能访问这个piblic目录中的文件，而程序文件是在application目录的，主要是安全。<br />
好，打开浏览器，按照你配置的url来访问，应该能看到一个ZF生成的简单页面了。</p>
<p>Tip 2 index.php配置<br />
ZF生成的public目录中，有一个index.php文件。这个文件是ZF应用的入口。这里的配置，主要是一些常量和ZF lib的位置。<br />
比如我就是这样配置的：</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

//这个是amf service的目录
define('SERVICES_PATH', APPLICATION_PATH . '/services');

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../../library'),
    get_include_path(),
)));

/** Zend_Application */
require_once '../../library/Zend/Application.php';  

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);

$application-&gt;bootstrap()
            -&gt;run();
</pre>
<p>Tip 3 配置文件<br />
ZF生成的application.ini文件位于/application/configs/下, 这个目录也经常会放其他配置文件，如route，i18n等。<br />
配置文件一定不能乱了。我们按照dev, prod两种环境来配置。</p>
<pre class="brush: plain; title: ; notranslate">
[general]
;includePaths.library = APPLICATION_PATH &quot;/../../library&quot;
bootstrap.path = APPLICATION_PATH &quot;/Bootstrap.php&quot;
bootstrap.class = &quot;Bootstrap&quot;
resources.frontController.controllerDirectory = APPLICATION_PATH &quot;/controllers&quot;

;database
resources.db.adapter = &quot;PDO_MYSQL&quot;
resources.db.isdefaulttableadapter = true
resources.db.params.driver_options.1002 = &quot;SET NAMES UTF8;&quot;

[development : general]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

resources.db.params.host = localhost
resources.db.params.username = bravo
resources.db.params.password = Z4wL6h8pA4KS5yDZ
resources.db.params.dbname = bravo

[production : general]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0

resources.db.params.host = 127.0.0.1
resources.db.params.username = test
resources.db.params.password = test
resources.db.params.dbname = test
</pre>
<p>Tip 4 AMF 服务的编写<br />
这个很简单。<br />
不需要继承任何类。</p>
<p>顺便说说gateway的提供。ZF中，gateway是一个controller。里面的内容比较常规：</p>
<pre class="brush: php; title: ; notranslate">

&lt;?php

	class GatewayController extends Zend_Controller_Action{

		public function init(){
			$this-&gt;getHelper('ViewRenderer')-&gt;setNoRender();
		}

		public function indexAction(){
			$server = new Zend_Amf_Server();
			$server-&gt;setSession('Bravo');
			Zend_Session::start(); //让amf服务支持session

			$server-&gt;addDirectory(SERVICES_PATH);//index.php中声明的，服务所在的目录
			//类的映射。
			$server-&gt;setClassMap('com.bravo.model.User', 'Brava_Model_User');

			echo($server-&gt;handle());
		}

	}

?&gt;
</pre>
<p>Tip 5 Bootstrap<br />
最主要的是初始化name space和数据库连接</p>
<pre class="brush: php; title: ; notranslate">
	protected function _initAutoload(){
		$autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' =&gt; 'Bravo',
            'basePath'  =&gt; dirname(__FILE__),
        ));
        return $autoloader;
	}

	protected function _initExtraConfig(){
		$resource = $this-&gt;getPluginResource('db');
		$db = $resource-&gt;getDbAdapter();
		Zend_Registry::set('db',$db);

		Zend_Registry::set('configSection',APPLICATION_ENV);

	}
</pre>
<p>Tip 6 Value Object的传输<br />
最让我头疼的。我现在的做法是，不使用ZF的Model, 直接用DbAdapter.<br />
所以，我在Model里定义的其实是VO.</p>
<p>定义一个Base:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

	class Bravo_Model_Base{

		public function setData($place){

			foreach($this as $key=&gt;$value){
				if( array_key_exists($key, $place)){
					$this-&gt;$key = $place[$key];
				}
			}
		}

	}

?&gt;
</pre>
<p>那么， User的Model就是：</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
	class Bravo_Model_User extends Bravo_Model_Base{
		public $_explicitType = 'com.bravo.model.User';

		public $id;
		public $email;
		public $nickname;
		public $passwd;
		public $avatar;

	}
?&gt;
</pre>
<p>在从数据库中取得数据后：</p>
<pre class="brush: php; title: ; notranslate">
		public function getPlace($i){
			$db = Zend_Registry::get('db');

			$select = $db-&gt;select();

			$select-&gt;from('place')
			-&gt;where('place.id='. $i);

			$p = $db-&gt;fetchRow($select);

			$pvo = new Bravo_Model_Place();
                        //就可以这样了
			$pvo-&gt;setData($p);
			return $pvo;
		}
</pre>
<p>下一篇我们说客户端-应该是很简单了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/430/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Efflex-开源的Flex效果库</title>
		<link>http://blog.ityao.com/archives/410</link>
		<comments>http://blog.ityao.com/archives/410#comments</comments>
		<pubDate>Thu, 17 Sep 2009 02:54:52 +0000</pubDate>
		<dc:creator>Daniel Yang</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[他山之石]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[Efflex]]></category>
		<category><![CDATA[效果]]></category>

		<guid isPermaLink="false">http://blog.ityao.com/?p=410</guid>
		<description><![CDATA[Flex下的效果库，除了Tweener一样的，就很少了。 Efflex提供cover flow, cube, flint, pixelate等效果，可以让我们的flex应用多那么一点色彩。 项目：http://www.efflex.org/ Efflex Explorer：http://www.efflex.org/EfflexExplorer.html 一个PPT：http://www.efflex.org/Flex%20Effects.pdf 开源：http://code.google.com/p/efflex/]]></description>
			<content:encoded><![CDATA[<p>Flex下的效果库，除了Tweener一样的，就很少了。<br />
Efflex提供cover flow, cube, flint, pixelate等效果，可以让我们的flex应用多那么一点色彩。</p>
<p><span id="more-410"></span></p>
<p>项目：<a href="http://www.efflex.org/" target="_blank">http://www.efflex.org/</a></p>
<p>Efflex Explorer：<a href="http://www.efflex.org/EfflexExplorer.html" target="_blank">http://www.efflex.org/EfflexExplorer.html</a></p>
<p>一个PPT：<a href="http://www.efflex.org/Flex%20Effects.pdf" target="_blank">http://www.efflex.org/Flex%20Effects.pdf</a></p>
<p>开源：<a href="http://code.google.com/p/efflex/" target="_blank">http://code.google.com/p/efflex/</a></p>
<p>
<object width="800" height="600">
<param name="movie" value="http://www.efflex.org/EfflexExplorer.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="800" height="600" src="http://www.efflex.org/EfflexExplorer.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/410/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>FlexBook和Zoomer</title>
		<link>http://blog.ityao.com/archives/399</link>
		<comments>http://blog.ityao.com/archives/399#comments</comments>
		<pubDate>Wed, 16 Sep 2009 14:59:19 +0000</pubDate>
		<dc:creator>Daniel Yang</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[资源共享]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[pageflip]]></category>
		<category><![CDATA[quietscheming]]></category>
		<category><![CDATA[zoomer]]></category>

		<guid isPermaLink="false">http://blog.ityao.com/?p=399</guid>
		<description><![CDATA[Quietly Scheming的Ely Greenfield的却是个大牛。他的qs控件都实用，很先进。他似乎对多媒体制作很在行，对效果很在行。 这个实例主要介绍了两个控件的用法：FlexBook，Zoomer。 在研究其他的类PageFlip控件时候，发现一个问题，Page view->Detail view的转换（查看一页上的详细内容）总显得不自然。 这个实例中，当你点击页面上的一个缩略图时候，整个页面都会缩放。 我借用他的实例，写了一个实例。和大家共享。 点击下载 或者这里下载]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.quietlyscheming.com/blog/" target="blank">Quietly Scheming</a>的Ely Greenfield的却是个大牛。他的qs控件都实用，很先进。他似乎对多媒体制作很在行，对效果很在行。<br />
<a href="http://blog.ityao.com/wp-content/uploads/2009/09/Screen-shot-2009-09-16-at-10.33.11-PM.png"><img src="http://blog.ityao.com/wp-content/uploads/2009/09/Screen-shot-2009-09-16-at-10.33.11-PM-300x143.png" alt="Screen shot 2009-09-16 at 10.33.11 PM" title="Screen shot 2009-09-16 at 10.33.11 PM" width="300" height="143" class="alignnone size-medium wp-image-402" /></a></p>
<p>这个实例主要介绍了两个控件的用法：FlexBook，Zoomer。<br />
在研究其他的类PageFlip控件时候，发现一个问题，Page view->Detail view的转换（查看一页上的详细内容）总显得不自然。<br />
这个实例中，当你点击页面上的一个缩略图时候，整个页面都会缩放。</p>
<p><span id="more-399"></span></p>
<p>我借用他的实例，写了一个实例。和大家共享。<br />
<a href='http://blog.ityao.com/wp-content/uploads/2009/09/FunAlbum.zip'>点击下载</a><br />
<a href="http://www.slingfile.com/file/S5wRyTKgL8" target="blank">或者这里下载</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/399/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>求mx:TextArea内容的高度</title>
		<link>http://blog.ityao.com/archives/281</link>
		<comments>http://blog.ityao.com/archives/281#comments</comments>
		<pubDate>Mon, 14 Sep 2009 12:58:23 +0000</pubDate>
		<dc:creator>Daniel Yang</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[textarea]]></category>
		<category><![CDATA[控件]]></category>

		<guid isPermaLink="false">http://blog.ityao.com/?p=281</guid>
		<description><![CDATA[有时候我们需要求得一个mx:TextArea内文字的的总高度，比如，根据文字多少，让TextArea自己决定高度（self-resizable textarea）]]></description>
			<content:encoded><![CDATA[<p>有时候我们需要求得一个mx:TextArea内文字的的总高度，比如，根据文字多少，让TextArea自己决定高度（self-resizable textarea）</p>
<p><span id="more-281"></span></p>
<pre class="brush: as3; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[			

			private function getHeight():void{
				var o_height:Number=0;

				for(var i:int=0; i &lt; ta.mx_internal::getTextField().numLines; i++) {
					o_height += ta.mx_internal::getTextField().getLineMetrics(i).height;
				}

				trace(o_height);
			}

		]]&gt;
	&lt;/mx:Script&gt;

	&lt;mx:TextArea id=&quot;ta&quot; width=&quot;200&quot; x=&quot;108&quot; y=&quot;63&quot;&gt;

	&lt;/mx:TextArea&gt;
	&lt;mx:Button x=&quot;108&quot; y=&quot;115&quot; label=&quot;Get Height&quot; click=&quot;getHeight();&quot;/&gt;
&lt;/mx:Application&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/281/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsley框架之Hello World</title>
		<link>http://blog.ityao.com/archives/226</link>
		<comments>http://blog.ityao.com/archives/226#comments</comments>
		<pubDate>Fri, 11 Sep 2009 15:24:37 +0000</pubDate>
		<dc:creator>Daniel Yang</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[parsley]]></category>

		<guid isPermaLink="false">http://blog.ityao.com/?p=226</guid>
		<description><![CDATA[(替阿银开个头。写一个Hello world示例.) Parsley是Flex/Flash/AIR的一个开发框架，使用AS3。 Spicelib是一个AS3的库，Parsley基于这个库，但是可以单独使用。 Parsley的功能有： Flexible IOC Container: Supports configuration with AS3 Metadata, MXML, XML files, ActionScript Dependency Injection: Injection by type or id &#8211; for constructors, methods or properties Messaging Framework: Fully decoupled senders and receivers, can serve as a basis for MVC architectures Flex View Wiring: Easily wire Flex components to objects declared [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.ityao.com/wp-content/uploads/2009/09/parsley_logo.png"><img class="aligncenter size-full wp-image-227" title="parsley_logo" src="http://blog.ityao.com/wp-content/uploads/2009/09/parsley_logo.png" alt="parsley_logo" width="443" height="211" /></a><br />
(替阿银开个头。写一个Hello world示例.)</p>
<p>Parsley是Flex/Flash/AIR的一个开发框架，使用AS3。<br />
Spicelib是一个AS3的库，Parsley基于这个库，但是可以单独使用。</p>
<p><span id="more-226"></span><br />
Parsley的功能有：</p>
<ul>
<li>Flexible IOC Container: Supports configuration with AS3 Metadata, MXML, XML files, ActionScript</li>
<li>Dependency Injection: Injection by type or id &#8211; for constructors, methods or properties</li>
<li>Messaging Framework: Fully decoupled senders and receivers, can serve as a basis for MVC architectures</li>
<li>Flex View Wiring: Easily wire Flex components to objects declared in the container</li>
<li>Advanced container features: Asynchronously initializing objects, object lifecycle, modular configuration contexts</li>
<li>Integration with Flex Modules: Allows configuration to be loaded and unloaded alongside Flex Modules</li>
<li>Localization: Integrates with Flex ResourceManager for Flex Applications, contains its own Localization Framework for Flash Applications</li>
<li>Extensibility: Easily create your own configuration tags, a single implementation can be used as AS3 Metadata, MXML or XML tag</li>
<li>And much more&#8230;bla bla blah</li>
</ul>
<p>Spicelib同时也提供：</p>
<ul>
<li>Reflection API: A clean object-oriented API built around the describeType XML output</li>
<li>XML-to-Object Mapper: Flexible architecture for mapping from XML to AS3 classes &#8211; in both directions</li>
<li>Task Framework: Abstraction for asynchronous operations and sequential or concurrent execution</li>
<li>Logging: Logging Framework for Flash Applications</li>
</ul>
<p>Step 1, 下载</p>
<p><a href="http://www.spicefactory.org/parsley/download.php">http://www.spicefactory.org/parsley/download.php</a></p>
<p>Step 2, 建立Flex项目</p>
<p>这个大家都会。在Flex Builder 3中建立一个ParsleyTest的项目。</p>
<p>我们在这个项目中，完成一个用户登录的示例。</p>
<p>Step 3, 引用</p>
<p>解压后，会有3个文件夹：</p>
<p>lib下，是你在开发的时候可能会用到的几个swc库文件。</p>
<p>src下，不言而喻。</p>
<p>release下，是我们这个教程需要的东西。当然，不是全部，我们这里只用到<span style="text-decoration: underline;">parsley-complete-flex-2.0.1.swc， spicelib-complete-flex-2.0.1.swc</span><br />
官方说只用一个就可以了&#8211;那是不可能的。<br />
为了方便，我们把这个文件移至ParsleyTest项目的lib文件夹下。</p>
<p>Step3, 建立Service</p>
<p>当然，一个Flex程序，应该是有服务端的。我们通过这个Service层来访问服务端。</p>
<p>首先要对这个Service抽象一下，这也是写在Parsley的BP中的。我们对服务端的业务访问都是由它来代理的。</p>
<p>代码很简单：</p>
<pre class="brush: as3; title: ; notranslate">
package org.cnflex.parsleytest.service
{
    public interface ILoginService
    {
        function login(user:String, passwd:String):void;
    }
}
</pre>
<p>代码不动，接口先行。现在实现这个接口：</p>
<pre class="brush: as3; title: ; notranslate">
package org.cnflex.parsleytest.service
{
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;

public class LoginServiceImpl extends EventDispatcher implements ILoginService
{
public function LoginServiceImpl(target:IEventDispatcher=null)
{
super(target);
}

public function login(user:String, passwd:String):void
{
//这里要访问服务器。
}

}
}
</pre>
<p>要注意的是，需要把服务从EventDispatcher继承，这样LoginServiceImpl就可以dispatchEvent了，比如，登录成功，失败，网络异常等事件。<br />
我们先不管login代码里怎么访问服务器。先看看在界面上怎么来调用这个LoginServiceImpl。<br />
这就要使用到Parsley的两个重要功能：Injection，IOC。<br />
这些概念都是从spring framework或者相似的框架中来的。</p>
<p>需要一个配置文件来完成这个，Parsley支持mxml，xml格式，也支持多重配置文件。<br />
现在我们用mxml方式。建立一个mxml配置,为了方便，直接放置于src目录下。</p>
<p>题外：如何建立一个从Object继承的组件。</p>
<p><a href="http://blog.ityao.com/wp-content/uploads/2009/09/parsley_beans.png"><img class="alignnone size-full wp-image-231" title="parsley_beans" src="http://blog.ityao.com/wp-content/uploads/2009/09/parsley_beans.png" alt="parsley_beans" width="533" height="581" /></a></p>
<p>我们在这个配置中先声明一个RemoteObject，访问服务端全靠它了。</p>
<p>然后再把刚才声明的服务放在这个配置里，把RemoteObject注入到服务中。代码大概为：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Object xmlns=&quot;*&quot; xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; xmlns:service=&quot;org.cnflex.parsleytest.service.*&quot;&gt;
&lt;mx:RemoteObject id=&quot;authRO&quot; showBusyCursor=&quot;true&quot; endpoint=&quot;http://localhost:8000/amf&quot; destination=&quot;auth&quot;/&gt;
&lt;service:LoginServiceImpl id=&quot;loginService&quot;/&gt;
&lt;/mx:Object&gt;
</pre>
<p>这样，<span style="text-decoration: underline;">所有在项目里标注Inject标签的变量，都会从这里找</span>。刚才说了，我们希望登录成功，失败等事件从这里发出，那就用Parsley标签来声明一下。<br />
声明事件先：</p>
<pre class="brush: as3; title: ; notranslate">
package org.cnflex.parsleytest.event
{
import flash.events.Event;

public class LoginEvent extends Event
{
public function LoginEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}

public static const LOGINSUCCESS:String = &quot;loginSuccess&quot;;
public static const LOGINFAIL:String = &quot;loginFail&quot;;

}
}
</pre>
<p>刚才的LoginServiceImpl就变成了：</p>
<pre class="brush: as3; title: ; notranslate">
package org.cnflex.parsleytest.service
{
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;

[ManagedEvents(&quot;loginSuccess,loginFail&quot;)]
public class LoginServiceImpl extends EventDispatcher implements ILoginService
{
[Inject(id=&quot;authRO&quot;)]
public var service:RemoteObject;

public function LoginServiceImpl(target:IEventDispatcher=null)
{
super(target);
}

public function login(user:String, passwd:String):void
{
//这里要访问服务器。
}

}
}
</pre>
<p>我们特意在Inject标签中说明id，就是想找配置文件中的那个相同id的RemoteObject对象。<br />
注意：这个变量是public的，要不然Parsley也访问不到哦～</p>
<p>现在我们有了一切，可以访问服务端了，我们需要用AsyncToken：</p>
<pre class="brush: as3; title: ; notranslate">
public function login(user:String, passwd:String):void{
    var token:AsyncToken = service.login(user, passwd);
    token.addResponder(new AsyncResponder(onLogin, onFault, token));
}

//如果登录成功了, 就用事件的方式告诉界面，或者其他需要知道的地方。
//一些服务端返回的数据也可以在这里带入
protected function onLogin(event:ResultEvent, token:AsyncToken):void{
    var evt:LoginEvent = new LoginEvent(LoginEvent.LOGINSUCCESS);
    this.dispatchEvent(evt);
}

//自己实现onFault.
</pre>
<p>如何知道已经登录成功，失败了呢？我们在主程序上试试：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;&gt;

&lt;mx:Script&gt;
&lt;![CDATA[
import org.cnflex.parsleytest.event.LoginEvent;

[MessageHandler(selector=&quot;loginSuccess&quot;)]
public function onLoginSuc(evt:LoginEvent):void{
//登录后干点啥。。。
}

]]&gt;
&lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<p>一个MessageHandler就能解决问题，方便吧？</p>
<p>注意：这个方法是public的，要不然Parsley也访问不到哦～</p>
<p>那，我们怎么登录呢？界面上如何调用我们刚才写的一堆的代码？<br />
答案还是Inject。还记得我们在配置中声明了一个LoginServiceImpl吧，把它拿过来：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;&gt;

&lt;mx:Script&gt;
&lt;![CDATA[
import org.cnflex.parsleytest.event.LoginEvent;

import org.cnflex.parsleytest.service.ILoginService;

[Inject(id=&quot;loginService&quot;)]
public var service:ILoginService;

private function onLoginClick():void{
this.service.login('d_yang','******');
}

[MessageHandler(selector=&quot;loginSuccess&quot;)]
public function onLoginSuc(evt:LoginEvent):void{
//登录后干点啥。。。
}

]]&gt;
&lt;/mx:Script&gt;
&lt;mx:Button label=&quot;假的登录&quot; click=&quot;onLoginClick()&quot;/&gt;
&lt;/mx:Application&gt;
</pre>
<p>好了。大功告成。运行。</p>
<p>但是却不会执行&#8230;&#8230;为啥？</p>
<p>因为缺少了最重要的一步：初始化Parsley:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;
preinitialize=&quot;FlexContextBuilder.build(Beans)&quot;
addedToStage=&quot;dispatchEvent(new Event('configureIOC', true));&quot;&gt;

&lt;mx:Script&gt;
&lt;![CDATA[
import org.cnflex.parsleytest.event.LoginEvent;
import org.spicefactory.parsley.flex.FlexContextBuilder;
import org.cnflex.parsleytest.service.ILoginService;

[Inject(id=&quot;loginService&quot;)]
public var service:ILoginService;

private function onLoginClick():void{
this.service.login('d_yang','******');
}

[MessageHandler(selector=&quot;loginSuccess&quot;)]
public function onLoginSuc(evt:LoginEvent):void{
//登录后干点啥。。。
}

]]&gt;
&lt;/mx:Script&gt;
&lt;mx:Button label=&quot;假的登录&quot; click=&quot;onLoginClick()&quot;/&gt;
&lt;/mx:Application&gt;
</pre>
<p>注意：这两个事件是不能改的。Parsley要求的很少，这点还是可以原谅的。</p>
<p>还有一个BP：细心的兄弟可能会发现，我在主程序中声明的是“public var service:ILoginService”，而不是具体的实现。<br />
其中原因留给兄弟们思考吧。</p>
<p>这个教程到此为止。</p>
<p>兄弟们可以继续了解：</p>
<ul>
<li>配置文件</li>
<li>注入</li>
<li>Action的用法</li>
<li>模块的支持</li>
<li>等等等等。</li>
</ul>
<p>Parsley的确是我目前所见过的用着最舒服的框架。</p>
<p>希望这篇文章能够给大家伙帮点忙。</p>
<p>代码打包附上，可以直接导入Flex Builder。</p>
<p><a href="http://blog.ityao.com/wp-content/uploads/2009/09/ParsleyTest.zip">http://blog.ityao.com/wp-content/uploads/2009/09/ParsleyTest.zip</a></p>
<p>感谢大家对IT妖的支持。</p>
<p>期待妖人们的加入。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/226/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>AIR读取CSV文件并进行保存</title>
		<link>http://blog.ityao.com/archives/198</link>
		<comments>http://blog.ityao.com/archives/198#comments</comments>
		<pubDate>Fri, 11 Sep 2009 02:41:28 +0000</pubDate>
		<dc:creator>Silver</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[pimento]]></category>

		<guid isPermaLink="false">http://blog.cnflex.org/?p=198</guid>
		<description><![CDATA[最近在帮一个朋友做一个程序，其中用到AIR读取Excel导出的CSV文件进行数据导入数据库的工作，中间碰到了一些问题，最后都可以一一解决，感觉挺有意思，特意拿来个大家分享一下。 完整代码在本贴的最后，完成的效果如下图所示： 具体开发步骤如下 第一步，CSV文件格式设置和导出： 通常一些业务资料会保存在Excel当中，CSV可以通过Excel文件的&#8221;另存为&#8221;获得这个格式的文件，不过要注意的是CSV的分隔符在某些机器上是&#8221;,&#8221;某些是&#8221;;&#8221;，这个是通过控制面板（&#8221;日期，时间语言和区域设置&#8221;->&#8221;区域和语言选项&#8221;->&#8221;自定义&#8221;->&#8221;列表分隔符&#8221; ）进行设置的。我的操作系统是XP，用的是Excel 2007，导出的时候是&#8221;;&#8221;。 可能在别的系统下操作会有所不同，在我的机器上导出的CSV文件是ansi内码。 第二步，获得文件的引用： 这里使用了两种不同的方式去获得文件的引用（即选择文件），一种是点击一个按钮，另一种是直接把csv文件拖动到界面上。 点击按钮选择文件更直观写，这部分代码如下： 这里设置了类型过滤器，用户只能选择&#8221;csv&#8221;结尾的文件，方便在一大堆文件中找出这个文件。 选择具体的文件后就可以读取里面的数据了。 而另外一种方法是把要读取的文件进程序中以完成数据导入，这种方式更直观快捷。 第三步，判断文件编码，然后读取文件： 之前刚完成程序后进行测试，csv文件里面有大量的中文内容，一开始没判断代码的时候直接使用下面的语句读取文件： 后来更发现数据进数据库后会是乱码，才知道这个csv文件不是UTF8的格式，是ANSI的，用notepad另存编码为UTF8就可以正常导入数据了。 追查原因，是因为这个ansi文件是不能正确用UTF的方式去读的。 那么以后怎么自动识别文件内码并正确读取而不变成乱码呢，于是就上搜索引擎搜索，终于找到一篇文章，抄了上面一段自动判断文件编码的代码。一句话概括之&#8211;先判断内容编码格式再按照编码格式去读取其数据就没错了！ 第四步，导入CSV的数据到数据库中： 这一步相对简单，首先是删除数据库已有的数据，然后把上一步中读成字符串的文件内容每行解析成一条数据，然后导入数据库中，这里使用了pimento框架的持久层实现方法，可以很容易地在Actionscript端完成CRUD的操作，代码如下： 删除已有数据,和服务器端JAVA EE里JPA的实现代码几乎一样： 然后是拆分CSV的文件，并把记录导入数据库 是不是觉得很有趣呢，在一个flex页面中就完成了一个独立的功能的前后台实现了，希望这个帖子能引起大家对parsley和pimento这两个框架的兴趣，过段时间我会继续写一些相关的介绍。 完整的程序代码如下：]]></description>
			<content:encoded><![CDATA[<p>最近在帮一个朋友做一个程序，其中用到AIR读取Excel导出的CSV文件进行数据导入数据库的工作，中间碰到了一些问题，最后都可以一一解决，感觉挺有意思，特意拿来个大家分享一下。<br />
<span id="more-198"></span><br />
完整代码在本贴的最后，完成的效果如下图所示：<br />
<img src="http://blog.cnflex.org/wp-content/uploads/2009/09/csvdrop.jpg" alt="csvdrop" title="csvdrop" width="500" height="379" class="alignnone size-full wp-image-205" /></p>
<p><strong>具体开发步骤如下</strong></p>
<ul>
<li><strong>第一步，CSV文件格式设置和导出：</strong><br />
通常一些业务资料会保存在Excel当中，CSV可以通过Excel文件的&#8221;另存为&#8221;获得这个格式的文件，不过要注意的是CSV的分隔符在某些机器上是&#8221;,&#8221;某些是&#8221;;&#8221;，这个是通过控制面板（&#8221;日期，时间语言和区域设置&#8221;->&#8221;区域和语言选项&#8221;->&#8221;自定义&#8221;->&#8221;列表分隔符&#8221; ）进行设置的。我的操作系统是XP，用的是Excel 2007，导出的时候是&#8221;;&#8221;。<br />
可能在别的系统下操作会有所不同，在我的机器上导出的CSV文件是ansi内码。
</li>
<li><strong>第二步，获得文件的引用：</strong><br />
这里使用了两种不同的方式去获得文件的引用（即选择文件），一种是点击一个按钮，另一种是直接把csv文件拖动到界面上。<br />
点击按钮选择文件更直观写，这部分代码如下：</p>
<pre class="brush: xml; title: ; notranslate">
private function browseFile():void{
	var typeFilters:Array = new Array();
	var typeFilter:FileFilter;
	typeFilter = new FileFilter(&quot;CSV Files(*.csv)&quot;, &quot;*.csv&quot;);
	typeFilters.push(typeFilter);

        var file:File = new File();
        file.addEventListener(Event.SELECT, importData);
        file.browseForOpen(&quot;选择要导入的CSV数据文件&quot;,typeFilters);
}
</pre>
<p>这里设置了类型过滤器，用户只能选择&#8221;csv&#8221;结尾的文件，方便在一大堆文件中找出这个文件。</p>
<pre class="brush: as3; title: ; notranslate">
private function importData(e:Event):void{
     var file:File = new File(e.target.nativePath);
     getFileContent(file);
        	}
</pre>
<p>选择具体的文件后就可以读取里面的数据了。</p>
<p>而另外一种方法是把要读取的文件进程序中以完成数据导入，这种方式更直观快捷。
</li>
<li><strong>第三步，判断文件编码，然后读取文件：</strong><br />
之前刚完成程序后进行测试，csv文件里面有大量的中文内容，一开始没判断代码的时候直接使用下面的语句读取文件：</p>
<pre class="brush: as3; title: ; notranslate">var fileContent:String = fileStream.readUTFBytes(fileStream.bytesAvailable)</pre>
<p>后来更发现数据进数据库后会是乱码，才知道这个csv文件不是UTF8的格式，是ANSI的，用notepad另存编码为UTF8就可以正常导入数据了。<br />
追查原因，是因为这个ansi文件是不能正确用UTF的方式去读的。<br />
那么以后怎么自动识别文件内码并正确读取而不变成乱码呢，于是就上搜索引擎搜索，终于找到一篇<a href="http://l4cd.net/Blog/article.asp?id=125">文章</a>，抄了上面一段自动判断文件编码的代码。一句话概括之&#8211;先判断内容编码格式再按照编码格式去读取其数据就没错了！</p>
<pre class="brush: as3; title: ; notranslate">
var code:String;
switch(true){
     case (b1==-1&amp;&amp;b2==-2):
          code = &quot;unicode&quot;;
          break;
    case (b1==-2&amp;&amp;b2==-1):
     	  code = &quot;unicodeFFFE&quot;;
	  break;
    case (b1==-17&amp;&amp;b2==-69):
    	   code = &quot;utf-8&quot;;
	   break;
    default:	code = &quot;ansi&quot;;
break;
}
var fileContent:String = fileStream.readMultiByte(fileStream.bytesAvailable,code);
fileStream.close();
</pre>
</li>
<li><strong>第四步，导入CSV的数据到数据库中：</strong><br />
这一步相对简单，首先是删除数据库已有的数据，然后把上一步中读成字符串的文件内容每行解析成一条数据，然后导入数据库中，这里使用了<a href="http://www.spicefactory.org/pimento/">pimento</a>框架的持久层实现方法，可以很容易地在Actionscript端完成CRUD的操作，代码如下：</p>
<p>删除已有数据,和服务器端JAVA EE里JPA的实现代码几乎一样：</p>
<pre class="brush: as3; title: ; notranslate">
private function parseCSV():void{
	var query:Query = entityManager.createQuery(&quot;DELETE FROM Owner o WHERE o.orgID=:orgID&quot;);
	query.setNamedParameter(&quot;orgID&quot;,curOrg.id);
	query.executeUpdate().addResultHandler(successDeleteOwner);
	if(owners!=null &amp;&amp; owners.length&gt;0){
		owners.removeAll();
	}else if(owners==null){
		owners = new ArrayCollection();
	}
}
</pre>
<p>然后是拆分CSV的文件，并把记录导入数据库</p>
<pre class="brush: as3; title: ; notranslate">
private function successDeleteOwner(rows:int):void{
	var csvArray:Array = new Array();
	var csvLines:Array = _content.split(String.fromCharCode(13,10));
	csvLines.splice(0,1);
	for each(var s:String in csvLines){
		var lineItems:Array = s.split(&quot;,&quot;);
		var owner:Owner = new Owner();
		owner.homeNumber = lineItems[3];
		owner.orgID = curOrg.id;
		owner.ownerName = lineItems[1];
		owner.propertyID =  lineItems[0];
		owner.smsNumber = lineItems[2];
		owner.remark = lineItems[4];
		entityManager.persist(owner).addResultHandler(successCreatedOwner);
	}
}
</pre>
</li>
</ul>
<p><br/><br />
是不是觉得很有趣呢，在一个flex页面中就完成了一个独立的功能的前后台实现了，希望这个帖子能引起大家对parsley和pimento这两个框架的兴趣，过段时间我会继续写一些相关的介绍。</p>
<p><br/></p>
<hr/>
完整的程序代码如下：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:VBox xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
	addedToStage=&quot;dispatchEvent(new Event('configureIOC', true))&quot; horizontalAlign=&quot;center&quot;
	width=&quot;100%&quot; height=&quot;100%&quot; creationComplete=&quot;listOrginazation()&quot;
	horizontalScrollPolicy=&quot;off&quot; verticalScrollPolicy=&quot;off&quot;
	nativeDragEnter=&quot;dragEnterHandler(event)&quot; nativeDragDrop=&quot;dragDropHandler(event)&quot;&gt;

	&lt;mx:Script&gt;
		&lt;![CDATA[
			import flash.utils.setTimeout;
			import org.spicefactory.lib.reflect.types.Void;
			import mx.events.ListEvent;
			import mx.events.ItemClickEvent;
			import org.spicefactory.pimento.service.Query;
			import mx.collections.ArrayCollection;
			import org.spicefactory.cinnamon.service.ErrorMessage;
			import mx.controls.Alert;
			import mx.utils.StringUtil;
			import com.coralbay.model.Organization;
			import com.coralbay.model.Owner;
			import org.spicefactory.pimento.service.EntityManager;

			[Inject]
			public var entityManager:EntityManager;

			[Bindable]
			private var organizations:ArrayCollection;

			[Bindable]
			private var curOrg:Organization = null;

			[Bindable]
			private var curOwner:Owner = null;			

			[Bindable]
			private var owners:ArrayCollection;

			private function listOrginazation():void{
				var query:Query = entityManager.createQuery(&quot;select o from Organization o Order By o.createTime desc&quot;);
				query.getResultList().addResultHandler(onResult);
			}

			private function onResult (orgs:Array) : void {
			    organizations = new ArrayCollection(orgs);
			    if(orgs.length&gt;0){
			    	curOrg = orgs[0];
			    	orgList.selectedIndex = 0;
			    }else{
			    	curOrg = null;
			    }
			}

			private function changeOrg():void{
				curOrg = orgList.selectedItem as Organization;
				listowner(curOrg.id);
			}

			private function listowner(orgId:int):void{
				var query:Query = entityManager.createQuery(&quot;select o from Owner o WHERE o.orgID=:orgID&quot;);
			    	query.setNamedParameter(&quot;orgID&quot;,orgId);
			    	query.getResultList().addResultHandler(onownerResult);
			}

			private function onownerResult(ops:Array):void{
				owners = new ArrayCollection(ops);
			}

			private function browseFile():void{  

				var typeFilters:Array = new Array();
				var typeFilter:FileFilter;
				typeFilter = new FileFilter(&quot;CSV Files(*.csv)&quot;, &quot;*.csv&quot;);
				typeFilters.push(typeFilter);

            	var file:File = new File();
            	file.addEventListener(Event.SELECT, importData);
            	file.browseForOpen(&quot;选择要导入的CSV数据文件&quot;,typeFilters);
        	}  

        	private function importData(e:Event):void{
            	//Alert.show(e.target.nativePath);
            	var file:File = new File(e.target.nativePath);
            	getFileContent(file);
        	}  

			private function dragEnterHandler(evt:NativeDragEvent):void{

				if(evt.clipboard.hasFormat(ClipboardFormats.FILE_LIST_FORMAT)){
					var dropFiles:Array = evt.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT) as Array;
					if(dropFiles.length&gt;1){
						Alert.show(&quot;只能选择一份CSV文件&quot;);
						return;
					}
					var file:File = dropFiles[0] as File;
					if(file.extension == &quot;csv&quot;){
						NativeDragManager.acceptDragDrop(this);
					}
				}
			} 

			private function dragDropHandler(evt:NativeDragEvent):void{
				//Alert.show(&quot;hihi&quot;);
				NativeDragManager.dropAction = NativeDragActions.COPY;
				var dropFiles:Array = evt.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT) as Array;
				getFileContent(dropFiles[0]);
			} 

			private var _content:String;
			private function getFileContent(_file:File):void{

				var fileStream:FileStream = new FileStream();
				fileStream.open(_file, FileMode.READ);
				var b1:int = fileStream.readByte();
				var b2:int = fileStream.readByte();
				fileStream.position = 0;
				var code:String;
				switch(true)
				{
					case (b1==-1&amp;&amp;b2==-2):
						code = &quot;unicode&quot;;
						break;
					case (b1==-2&amp;&amp;b2==-1):
						code = &quot;unicodeFFFE&quot;;
						break;
					case (b1==-17&amp;&amp;b2==-69):
						code = &quot;utf-8&quot;;
						break;
					default:
						code = &quot;ansi&quot;;
						break;
				}
				//var fileContent:String = fileStream.readUTFBytes(fileStream.bytesAvailable);
				var fileContent:String = fileStream.readMultiByte(fileStream.bytesAvailable,code);
				fileStream.close();
				_content = fileContent;
				parseCSV();
			}

			private function onErrorResult(event:ErrorMessage):void{
				Alert(&quot;删除数据失败！&quot;);
				listowner(curOrg.id);
			}

			private function parseCSV():void{
				var query:Query = entityManager.createQuery(&quot;DELETE FROM Owner o WHERE o.orgID=:orgID&quot;);
				query.setNamedParameter(&quot;orgID&quot;,curOrg.id);
				query.executeUpdate().addResultHandler(successDeleteOwner);
				if(owners!=null &amp;&amp; owners.length&gt;0){
					owners.removeAll();
				}else if(owners==null){
					owners = new ArrayCollection();
				}
			}	

			private function successDeleteOwner(rows:int):void{
				var csvArray:Array = new Array();
				var csvLines:Array = _content.split(String.fromCharCode(13,10));
				csvLines.splice(0,1);
				for each(var s:String in csvLines){
					var lineItems:Array = s.split(&quot;,&quot;);
					var owner:Owner = new Owner();
					owner.homeNumber = lineItems[3];
					owner.orgID = curOrg.id;
					owner.ownerName = lineItems[1];
					owner.propertyID =  lineItems[0];
					owner.smsNumber = lineItems[2];
					owner.remark = lineItems[4];
					entityManager.persist(owner).addResultHandler(successCreatedOwner);
				} 

			} 

			private function successCreatedOwner(owner:Owner):void{
				//nothing to do now
				owners.addItem(owner);
			}

		]]&gt;
	&lt;/mx:Script&gt;

	&lt;mx:HBox width=&quot;100%&quot; verticalAlign=&quot;middle&quot;&gt;
		&lt;mx:Label text=&quot;选择公司：&quot;/&gt;
		&lt;mx:ComboBox id=&quot;orgList&quot; dataProvider=&quot;{organizations}&quot; labelField=&quot;name&quot; close=&quot;changeOrg()&quot;/&gt;
		&lt;mx:Spacer width=&quot;100%&quot;/&gt;
		&lt;mx:Button label=&quot;清空当前数据并导入新业主资料&quot; click=&quot;browseFile()&quot;/&gt;
	&lt;/mx:HBox&gt;

	&lt;mx:DataGrid width=&quot;100%&quot; dataProvider=&quot;{owners}&quot; height=&quot;100%&quot; id=&quot;ownerDG&quot;&gt;
		&lt;mx:columns&gt;
	         &lt;mx:DataGridColumn dataField=&quot;propertyID&quot; headerText=&quot;房号&quot;/&gt;
	         &lt;mx:DataGridColumn dataField=&quot;ownerName&quot; headerText=&quot;业主姓名&quot;/&gt;
	         &lt;mx:DataGridColumn dataField=&quot;smsNumber&quot; headerText=&quot;短信号码&quot;/&gt;
	         &lt;mx:DataGridColumn dataField=&quot;homeNumber&quot; headerText=&quot;住宅电话&quot;/&gt;
	         &lt;mx:DataGridColumn dataField=&quot;remark&quot; headerText=&quot;备注&quot;/&gt;
	     &lt;/mx:columns&gt;
	&lt;/mx:DataGrid&gt;
&lt;/mx:VBox&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/198/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Study of Flash Media Server [5/2009]</title>
		<link>http://blog.ityao.com/archives/181</link>
		<comments>http://blog.ityao.com/archives/181#comments</comments>
		<pubDate>Thu, 10 Sep 2009 03:15:31 +0000</pubDate>
		<dc:creator>Daniel Yang</dc:creator>
				<category><![CDATA[资源共享]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>
		<category><![CDATA[FMS]]></category>
		<category><![CDATA[杂志]]></category>

		<guid isPermaLink="false">http://blog.cnflex.org/?p=181</guid>
		<description><![CDATA[杂志名称： Study of Flash Media Server(5/2009) 共108页 主要内容: Putting “Brains” into Flash Apps&#8230; News Digital Media Toyota Tarago Campaign Driving a Difference&#8230; Working with MySQL Database from Flash Media Server Server-Side ActionScript&#8230; Adobe Flash Media Server 3.5&#8230; Streaming to Flash and iPhone with Wowza Media Server 2 Advanced&#8230; Wowza Media Server&#8230; Options When Planning a [...]]]></description>
			<content:encoded><![CDATA[<p>杂志名称： Study of Flash Media Server(5/2009)<br />
共108页<br />
主要内容:</p>
<ul>
<li>Putting “Brains” into Flash Apps&#8230;</li>
<li>News Digital Media Toyota Tarago Campaign Driving a Difference&#8230;</li>
<li>Working with MySQL Database from Flash Media Server Server-Side ActionScript&#8230;</li>
<li>Adobe Flash Media Server 3.5&#8230;</li>
<li>Streaming to Flash and iPhone with Wowza Media Server 2 Advanced&#8230;</li>
<li>Wowza Media Server&#8230;</li>
<li>Options When Planning a Video Application With FMS&#8230;</li>
<li>A Journey into Adobe Flex Charting Components Part1&#8230;</li>
<li>Flex and ColdFusion Services&#8230;</li>
<li>Flex Remoting with AMFPHP – in depth&#8230;</li>
<li>Word of the Day Application Using Yahoo Pipes and flickr&#8230;</li>
<li>Multiple File Upload Using AMFPHP&#8230;</li>
<li>Personal TV: A Simple Personal Television Broadcasting and Television Network&#8230;</li>
<li>Unconditional Patterns—The State and Strategy Design Patterns: Part I&#8230;</li>
<li>PureMVC for haXe&#8230;</li>
<li>Interview with Charlie Good&#8230;</li>
<li>About Influxis. Interview with Wes Daggett, Influxis Sales Manager&#8230;</li>
<li>About Influxis. Interview with Joe “Bear” Lopez, Developer of VStation 2.0 Beta&#8230;</li>
<li>About Influxis. Interview with Sean “SeanTron” McCracken, Developer of Massiva3D&#8230;</li>
</ul>
<p><span id="more-181"></span><br />
<a href="http://blog.cnflex.org/wp-content/uploads/2009/09/ff_study_fms_cover.png"><img src="http://blog.cnflex.org/wp-content/uploads/2009/09/ff_study_fms_cover.png" alt="ff_study_fms_cover" title="ff_study_fms_cover" width="405" height="579" class="alignnone size-full wp-image-182" /></a></p>
<p>下载：http://www.damipan.com/file/3Y3YHxm.html</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/181/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash&amp;Flex Developers’ Magazine[0904]</title>
		<link>http://blog.ityao.com/archives/178</link>
		<comments>http://blog.ityao.com/archives/178#comments</comments>
		<pubDate>Thu, 10 Sep 2009 03:09:20 +0000</pubDate>
		<dc:creator>Daniel Yang</dc:creator>
				<category><![CDATA[资源共享]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[杂志]]></category>

		<guid isPermaLink="false">http://blog.cnflex.org/?p=178</guid>
		<description><![CDATA[主要内容： Creating a game using WOW-Engine &#8211; Alexandru Gherghelegiu Rich Components with Flash and Flex &#8211; Jonnie Spratley 共100页。 下载地址：http://www.damipan.com/file/3WhliCX.html]]></description>
			<content:encoded><![CDATA[<p>主要内容：<br />
Creating a game using WOW-Engine &#8211; Alexandru Gherghelegiu<br />
Rich Components with Flash and Flex &#8211; Jonnie Spratley<br />
共100页。</p>
<p><span id="more-178"></span><br />
<a href="http://blog.cnflex.org/wp-content/uploads/2009/09/ffmagazine_cove_0904.png"><img src="http://blog.cnflex.org/wp-content/uploads/2009/09/ffmagazine_cove_0904.png" alt="ffmagazine_cove_0904" title="ffmagazine_cove_0904" width="407" height="577" class="alignnone size-full wp-image-179" /></a></p>
<p>下载地址：http://www.damipan.com/file/3WhliCX.html</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ityao.com/archives/178/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

