<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>虎子哥官方博客 - Flash</title><link>http://freegezi.net/blog/</link><description>Good Luck To You! - </description><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 100427</generator><language>zh-CN</language><copyright>  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-753177-1']);  _gaq.push(['_trackPageview']);  (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();</copyright><pubDate>Tue, 07 Sep 2010 22:16:33 +0800</pubDate><item><title>摩尔码转换</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/摩尔码转换.html</link><pubDate>Fri, 18 Dec 2009 17:01:44 +0800</pubDate><guid>http://freegezi.net/blog/post/摩尔码转换.html</guid><description><![CDATA[<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="450" height="320" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="/blog/UPLOAD/content/2009/12/moore2char.swf" /><embed type="application/x-shockwave-flash" width="450" height="320" src="/blog/UPLOAD/content/2009/12/moore2char.swf"></embed></object>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/摩尔码转换.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=894</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=894&amp;key=2985edc4</trackback:ping></item><item><title>AS生成随机数——双色球机选器</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/as生成随机数——双色球机选器.html</link><pubDate>Thu, 12 Nov 2009 13:09:19 +0800</pubDate><guid>http://freegezi.net/blog/post/as生成随机数——双色球机选器.html</guid><description><![CDATA[<p><code> function getRandom(len):Array{<br /><br/>&nbsp;&nbsp;&nbsp; var pk:Array = [];<br /><br/>&nbsp;&nbsp;&nbsp; for(var i=0;i&lt;len;i++){<br /><br/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pk[i] = i;<br /><br/>&nbsp;&nbsp;&nbsp; }<br /><br/>&nbsp;&nbsp;&nbsp; var tArr:Array = new Array();<br /><br/>&nbsp;&nbsp;&nbsp; var t:Number;<br /><br/>&nbsp;&nbsp;&nbsp; while (pk.length &gt; 0) {<br /><br/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; t = Math.floor(Math.random() * pk.length);<br /><br/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tArr.push(pk[t]);<br /><br/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pk.splice(t, 1);<br /><br/>&nbsp;&nbsp;&nbsp; }<br /><br/>&nbsp;&nbsp;&nbsp; pk = tArr;<br /><br/>&nbsp;&nbsp;&nbsp; return pk;</code><code><br /><br/>}<br /><br/></code><embed width="400" height="22" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="/blog/UPLOAD/content/2009/11/twocolor.swf" play="true" loop="true" menu="true"></embed></p>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/as生成随机数——双色球机选器.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=886</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=886&amp;key=dc5f95cf</trackback:ping></item><item><title>寒潮来临前的落日</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/寒潮来临前的落日.html</link><pubDate>Sat, 31 Oct 2009 17:36:06 +0800</pubDate><guid>http://freegezi.net/blog/post/寒潮来临前的落日.html</guid><description><![CDATA[<p><embed width="450" height="690" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="/blog/UPLOAD/content/2009/10/sunset.swf" play="true" loop="true" menu="true"></embed></p><p>386张合成动画</p>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/寒潮来临前的落日.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=877</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=877&amp;key=0b0d4d4f</trackback:ping></item><item><title>拍摄时间计算器</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/拍摄时间计算器.html</link><pubDate>Wed, 28 Oct 2009 00:13:44 +0800</pubDate><guid>http://freegezi.net/blog/post/拍摄时间计算器.html</guid><description><![CDATA[<p><embed width="450" height="370" menu="true" loop="true" play="true" src="/blog/UPLOAD/content/2009/10/cal.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed><br /><br/>以后拍摄得多了就得做拍摄计划，晚上的时间是宝贵滴！</p>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/拍摄时间计算器.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=876</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=876&amp;key=0332e9ed</trackback:ping></item><item><title>检测字符串是否在数组中存在</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/检测字符串是否在数组中存在.html</link><pubDate>Fri, 23 Oct 2009 20:53:27 +0800</pubDate><guid>http://freegezi.net/blog/post/检测字符串是否在数组中存在.html</guid><description><![CDATA[<p><code>function isIn ($needle:*,$haystack:Array):Boolean { </code><code><br /><br/>&nbsp;&nbsp; return $haystack.<font color="#00ccff">indexOf </font>($needle) != -1;<br /><br/>} <br /><br/>var $string = 'Jonnie';<br /><br/>trace(isIn ($string,[&quot;Jonnie&quot;, &quot;loves&quot;, &quot;Subway&quot;, &quot;cookies&quot;])); <br /><br/>Object检测属性是否存在用$object.<font color="#00ccff">propertyIsEnumerable</font>($name);</code></p>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/检测字符串是否在数组中存在.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=875</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=875&amp;key=0cb36312</trackback:ping></item><item><title>PureMVC的原理和逻辑</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/puremvc的原理和逻辑.html</link><pubDate>Mon, 31 Aug 2009 20:54:26 +0800</pubDate><guid>http://freegezi.net/blog/post/puremvc的原理和逻辑.html</guid><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PureMVC框架的目标很明确，即把程序分为低耦合的三层：Model、View和Controller。它们合称为PureMVC框架的核心，由Facade统一管理。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一、Model保存对Proxy对象的引用，Proxy负责操作数据模型，与远程服务通信存取数据。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;二、View保存对Mediator对象的引用。由Mediator对象来操作具体的视图组件（View Component，例如Flex的DataGrid组件），包括：添加事件监听器，发送或接收Notification ，直接改变视图组件的状态。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;三、Controller保存所有Command的映射。Command可以获取Proxy对象并与之交互，通过发送Notification来执行其他的Command。<br /><br/><br /><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我们要所要做的是编写具体的Command，Mediator，Proxy。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一、Proxy是负责操作数据模型的，什么是数据模型？数据模型就是数据库，XML等等。我们可以直观地理解为，Proxy是用来对数据模型进行查询、插入、更新、删除等操作的类。操作完成后，它就会发送Notification，也就是通知，告诉其它两个层我已经完成工作了。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;二、Mediator负责操作具体的视图组件，包括：添加事件监听器，发送或接收Notification ，直接改变视图组件的状态。好像抽象了点。具体的说吧，Mediator是负责管理用户界面，与用户进行交互操作的。如：给Button添加事件，当用户点击按钮时，发送Notification，告诉Controler我们执行什么样的操作。比如这是一个登录的按钮，那么Mediator就会告诉发送通 知给Controler，告诉它要执行登录操作。此外，Mediator还负责直接改变视图的状态。就像，我点击了登录按钮后，Mediator就改变 它，让登录按钮不过用，避免重复操作。它还可以在视图上显示一条信息，告诉我正在执行登录操作。总的来说，Mediator是用来管理视图的。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;三、Command可以获取Proxy对象并与之交互，通过发送Notification来执行其他的Command。再拿上面的 登录例子作解释，当点击了登录按钮后，Mediator就会告诉Controler要执行相应的Command了，比如LoginComand。既然是登录，那么还得要知道用户的信息才行。Command就会发送Notification告知Proxy，我需要某个用户的信息。那么Proxy就会访问数据库（也可以是别的数据模型），查询对应的用户信息，然后发送Notification通知Command我已经查询好了，差把信息返回给Command进 行验证，与些同时，Mediator也可以接收Proxy发送的Notification，通过视图告诉用户正在验证信息。Command验证了用户信息 后，发送Notification把验证结果返回给Mediatory，告诉用户验证的结果。或者，Command也可以发送Notification执 行其它的Command操作，比如验证通过后，读取用户的详细资料。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 上面的Command，Mediator，Proxy的具体实现类都是要自己编写的，工作量还是比较大的。</p><p>&nbsp;</p>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/puremvc的原理和逻辑.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=852</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=852&amp;key=cb6aa051</trackback:ping></item><item><title>计算木星事件</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/计算木星事件.html</link><pubDate>Thu, 20 Aug 2009 17:58:09 +0800</pubDate><guid>http://freegezi.net/blog/post/计算木星事件.html</guid><description><![CDATA[<div align="center"><embed width="450" height="380" menu="true" loop="true" play="true" src="/blog/UPLOAD/content/2009/08/jupiters-moon.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div><p><br /><br/>当前版本新增功能：</p><ul>    <li>大红斑预报</li>    <li>手动设置时间</li></ul>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/计算木星事件.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=839</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=839&amp;key=4c1e9a35</trackback:ping></item><item><title>RIA项目失败的教训</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/ria项目失败的教训.html</link><pubDate>Thu, 23 Jul 2009 16:31:05 +0800</pubDate><guid>http://freegezi.net/blog/post/ria项目失败的教训.html</guid><description><![CDATA[<p>EffectiveUI公司主席Anthony Franco最近做了一次名为&ldquo;<a title="RIA项目失败的十种方式" href="http://videos.visitmix.com/MIX09/C06F" id="lmb5">RIA项目失败的十种方式</a>&rdquo;的演讲，为想要RIA项目失败的人提供了十条建议。SAP AG的Gerd Waloszek则总结了&ldquo;<a title="糟糕用户界面的18黄金法则" href="http://www.sapdesignguild.org/community/design/golden_rules.asp" id="dz9o">糟糕用户界面的18黄金法则</a>&rdquo;。</p><p>以下是Franco提供的十条逆向建议，并解释了为何要避免它们，而应该如何去做：</p><ol>    <li><strong>如果你想失败，那就不要理解最终用户</strong>&mdash;&mdash;70%的IT项目失败都是由于用户可接受性出了问题。</li>    <li><strong>如果你想失败，那就相信开发人员能够正确的做出设计决定</strong>。开发人员被逼迫着做出糟糕的设计，因为他们的工作量是由其所完成的功能数量决定的。当一个项目将要接近截止日期时，开发人员就会关注于删除功能而不是从最终用户的角度思考。</li>    <li><strong>如果你想失败，那就期望一个银弹式的设计。</strong>好主意是值得肯定的，但一个伟大的功能建议不应该取代优秀健康的UI设计。</li>    <li><strong>如果你想失败，那就满足所有人的需求。</strong>&ldquo;如果一个公司试图为所有人创造一个产品，那么最后不会适用于任何人&rdquo;。</li>    <li><strong>如果你想失败，那就启动项目然后忘却。</strong>在项目启动之后，产品需要更多的迭代以不断完善。</li>    <li><strong>如果你想失败，那就不要定义成功。</strong>不定义成功意味着不知道目标是什么。</li>    <li><strong>如果你想失败，那就避免冲突。</strong>冲突未必是坏事，因为&ldquo;没有冲突就没有进步&rdquo;。当屋子里的所有人都赞同某种看法时，那么就要提高警惕了。</li>    <li><strong>如果你想失败，那就相信不需要推销自己的想法。</strong>利益相关者应该努力在组织内部推销自己的想法，但不要期望仅仅因为来源于你就会被接受。这需要准备回答类似下面的问题：投资回报率如何？优点是什么？为什么要现在做？如果不做会怎么样？</li>    <li><strong>如果你想失败，那就追求完美。</strong>不应该一开始就把所有都计划好，并期望现实会按照计划行事，因为变化无处不在。</li>    <li><strong>如果你想失败，那就重视过程甚于产品。</strong>这条建议可以改写为：&ldquo;如果你想失败，那就不要冒险&rdquo;。我们可以非常重视开发过程，但是&ldquo;按时生产一个糟糕的产品毫无意义&rdquo;，通过迭代的方法构建满意的产品更轻松一些。</li></ol><p>以下是Waloszek总结的糟糕用户界面18黄金法则，提供了负面的例子：</p><blockquote><br/><ol>    <li><strong>让客户忙于那些不必要的工作</strong>&mdash;&mdash;让用户在某些控件填写数据，随后又提示他们不能在那里输入数据（比如，一个应用让你在假期或周末填写数据，随后又提示说你不能在那些天工作）。</li>    <li><strong>不遵守标准</strong>&mdash;&mdash;不把菜单条目放置在通常的类别和位置上（比如，在&ldquo;编辑&rdquo;菜单中放置&ldquo;保存&rdquo;按钮）。</li>    <li><strong>让软件运行缓慢</strong>&mdash;&mdash;有无数的可能性导致软件运行缓慢。比如，你可以在每个用户输入之后包含长时间的验证或者切换。或者你可以强制用户浏览一连串的对话框。</li>    <li><strong>尽可能地使用缩写，特别是在有足够空间显示完整单词的情况下</strong>&mdash;&mdash;使用&ldquo;dat.&rdquo;而不是&ldquo;date&rdquo;，&ldquo;Tolky&rdquo;而不是&ldquo;Tolerance Key&rdquo;，&ldquo;NxOb&rdquo;而不是&ldquo;Next Object&rdquo;，等等还有很多......</li>    <li><strong>使用技术型语言指导用户</strong>&mdash;&mdash;使用UTF-8格式发送URL（需要重启，在MS IE的高级设置里）</li>    <li><strong>隐藏在用户看来重要和常用的功能</strong>&mdash;&mdash;把其藏在用户永远找不到的菜单里。</li>    <li><strong>让你的应用只支持鼠标&mdash;&mdash;绝不提供任何键盘快捷键</strong>。</li>    <li><strong>使用你的应用成为一项挑战</strong>&mdash;&mdash;即使用户操作会导致严重的后果也不加以提示。</li>    <li><strong>脱离最终用户</strong>&mdash;&mdash;许多用户有许多的选择，你只提供一个。这倒是可以更快更简单的实现。</li>    <li><strong>宣扬糟糕的示例</strong>&mdash;&mdash;只需要听从本页的其他黄金法则就可以实现。</li>    <li><strong>花费大量精力设置糟糕的缺省参数：与用户的期望背道而驰，缺省配置极其糟糕、令人厌恶、无用&mdash;&mdash;反正由你决定</strong>&mdash;&mdash;在web表单上做缺省设置使用户收到不想要的新闻或者广告，散布他们的地址等等。</li>    <li><strong>在每次系统重新恢复之后都破坏工作上下文</strong>&mdash;&mdash;在系统重启之后取消之前选择的屏幕元素。</li>    <li><strong>忽略让用户更方便的功能&mdash;&mdash;让他们很辛苦</strong>&mdash;&mdash;当用户需要在列表中添加条目时，只允许他们在列表末端插入条目，然后再让用户把条目移动到正确的位置。换句话说，没有提供额外的功能用于直接将条目插入到目标位置。为了增加点情趣，当用户直接把条目移动到目标位置时，应用提示一些伪造的错误，然后把条目插入到末尾。</li>    <li><strong>不让用户中断消耗时间和/或消耗资源的进程</strong>&mdash;&mdash;偷偷启动一个备份或者索引进程，让用户难以取消，也就是说，无视用户的鼠标点击和键盘操作。</li>    <li><strong>应用不合逻辑</strong>&mdash;&mdash;添加一个准备某操作的按钮使用户确认可以做该操作了。这里有一个真实例子：在许多电子邮件应用中，&ldquo;转发&rdquo;按钮实际上没有真正执行转发操作，而是做转发之前的准备工作（因为，我们不得不提供收件人地址）。</li>    <li><strong>时不时的来一次系统崩溃或者让应用僵死</strong>&mdash;&mdash;让编辑器或者编辑域在用户事先未预料的情况下僵死，以至于用户还没有来得及保存他们的工作成果，而频繁保存的习惯会浪费宝贵的系统资源。</li>    <li><strong>尽可能的阻碍用户输入</strong>&mdash;&mdash;页面加载也是阻碍用户输入的好机会。在等待的时候，用户可能会与室友聊天、读报或者盯着空屏幕发呆。</li>    <li><strong>阻碍用户输入，即使没有必要</strong>&mdash;&mdash;阻碍用户在图片浏览器更新缩略图的时候输入就是一个很好的例子&mdash;&mdash;没有任何理由阻止用户滚动、选择图片或者发起操作。</li></ol></blockquote>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/ria项目失败的教训.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=826</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=826&amp;key=52960617</trackback:ping></item><item><title>小夫妻的起床方式（爆笑）</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/小夫妻的起床方式（爆笑）.html</link><pubDate>Thu, 16 Jul 2009 16:13:53 +0800</pubDate><guid>http://freegezi.net/blog/post/小夫妻的起床方式（爆笑）.html</guid><description><![CDATA[<p><embed width="400" height="600" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="/blog/UPLOAD/content/2009/07/morning.swf" play="true" loop="true" menu="true"></embed></p>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/小夫妻的起床方式（爆笑）.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=823</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=823&amp;key=f6b70a69</trackback:ping></item><item><title>镜头视角计算器</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/镜头视角计算器.html</link><pubDate>Thu, 02 Jul 2009 22:30:40 +0800</pubDate><guid>http://freegezi.net/blog/post/镜头视角计算器.html</guid><description><![CDATA[<p><embed width="530" height="250" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="/blog/UPLOAD/content/focus.swf" play="true" loop="true" menu="true"></embed><br />标准变焦镜头&mdash;&mdash;从街头抓拍到人物拍摄都能使用的万能镜头，画面视角自然是它的魅力所在。</p>]]></description><category>Flash</category><comments>http://freegezi.net/blog/post/镜头视角计算器.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=816</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=816&amp;key=780826aa</trackback:ping></item></channel></rss>
