<?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>dmh2002's Blog - AS3 经验/技巧/游戏</title><link>http://dmh2002.com/</link><description>专注于 ActionScript 3.0  在各应用领域的研究。 - </description><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 91204</generator><language>zh-CN</language><copyright>Copyright 2008-2010 DMH2002's Blog  Some Rights Reserved.沪ICP备07021739号</copyright><pubDate>Wed, 08 Sep 2010 09:31:08 +0800</pubDate><item><title>if后面的分号（写代码的时候需要留意）</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/167.html</link><pubDate>Tue, 27 Apr 2010 00:43:19 +0800</pubDate><guid>http://dmh2002.com/post/167.html</guid><description><![CDATA[<p>if(&nbsp;true );</p><p>{ return}</p><p>如果你的代码是这样,你的代码始终都会被return掉，正确的应该是</p><p>if(&nbsp;true )</p><p>{ return}</p><p>一般不会有这样的错误发生，但是谁知道那天就有这么个不留意呢？</p><p>&nbsp;</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/167.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=167</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=167&amp;key=4f750453</trackback:ping></item><item><title>AS2与AS3通信</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/135.html</link><pubDate>Tue, 19 May 2009 13:26:42 +0800</pubDate><guid>http://dmh2002.com/post/135.html</guid><description><![CDATA[<p>由于当AS3加载AS2时,AS2会在AMV1中运行,<br />AS3文件跟AS2文件互相都不可以进行操作(跟两个swf独立运行无区别)..<br />我们常用的解决方法是使用LocalConnection作为他们之前的桥梁..<br />实现通信进行操作..<br /><br />下面的例子..<br />先给AS3进行LocalConnection的运行,,让他处理连接状态(就像一个服务端)<br />然后AS2使用LocalConnection中的send,调用AS3中的方法<br />...</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/135.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=135</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=135&amp;key=bc25611b</trackback:ping></item><item><title>JAVA和FLASH在SOCKET下通信.拼装数据最后转成AMF3对象</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/131.html</link><pubDate>Tue, 17 Mar 2009 12:58:14 +0800</pubDate><guid>http://dmh2002.com/post/131.html</guid><description><![CDATA[<p>服务端发数据过来.如果数据量大.<br />会分为几次发送.<br />如果真接用读对象,会报错.&quot;遇到文件尾&quot;.<br />那就需要拼装数据流.在把数据流存到ByteArray中.<br />在利用和服务端协商数据流最后结尾的ASCII码是多少.<br />在边收数据边判断是不是到数据流的结尾.<br />如果结尾就把刚才分次读出来的数据.整理成一个AMF3对象.</p><p>具体操作如下:</p><p>客户端:FLASH</p><p>接受数据</p><p>...</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/131.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=131</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=131&amp;key=14a9668a</trackback:ping></item><item><title>AS3 数组排序</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/119.html</link><pubDate>Thu, 25 Sep 2008 15:35:52 +0800</pubDate><guid>http://dmh2002.com/post/119.html</guid><description><![CDATA[<p>var arr:Array = [{id:4,name:&quot;obj&quot;},{id:3,name:&quot;obj&quot;},{id:5,name:&quot;obj&quot;},{id:8,name:&quot;obj&quot;}];</p><p>按id排序</p><p><br />arr.sortOn(&quot;id&quot;,Array.NUMERIC)</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/119.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=119</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=119&amp;key=af48cc6f</trackback:ping></item><item><title>利用BlazeDS的AMF3数据封装与Flash 进行Socket通讯</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/117.html</link><pubDate>Thu, 11 Sep 2008 23:19:24 +0800</pubDate><guid>http://dmh2002.com/post/117.html</guid><description><![CDATA[<p><h2 style="word-wrap: break-word; margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: normal; font-size: 1.17em; margin-bottom: 0.5em; ">利用BlazeDS的AMF3数据封装与Flash 进行Socket通讯</h2>...</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/117.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=117</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=117&amp;key=7ef33e45</trackback:ping></item><item><title> [AS3]AMF3+JAVA的调用范例</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/116.html</link><pubDate>Thu, 11 Sep 2008 23:07:16 +0800</pubDate><guid>http://dmh2002.com/post/116.html</guid><description><![CDATA[<p>[AS3]AMF3+JAVA的调用范例<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;amf是Adobe独家开发的数据封装格式，Flash可以直接访问，由于它是基于二进制的数据传输，所以相对于xml  SOAP、json、webService等基于字符串的数据格式，有数据体积小和效率高的特点。<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;amf目前有AMF0和AMF3两种格式，flash8以前版本只支持AMF0，flash9支持两种格式。AMF3比AMF0效率更高。<br />...</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/116.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=116</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=116&amp;key=9f009254</trackback:ping></item><item><title>Base64转byteArray再转bitmapdata</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/106.html</link><pubDate>Sat, 02 Aug 2008 20:19:32 +0800</pubDate><guid>http://dmh2002.com/post/106.html</guid><description><![CDATA[<p>&nbsp;&nbsp;&nbsp; Base64是一个String便于socket传递，在某个客户想向另外一个客户端呈现只有自己有的图片时，就不需要将图片上传到服务器，再把链接发给另外一个客户端，而另外一个客户端得到链接之后，去服务器下载这张图片，再表现出来。</p><p>&nbsp;&nbsp;&nbsp; 可以把图片转成base64，然后直接传给另一个客户端，另外一个客户端收到之后转byteArray再转bitmapdata，就可以表现了。</p><p>&nbsp;&nbsp;&nbsp; 只是一句话的经验之谈，忽然想到的，记下来，以后可能会找到更有价值的应用。</p><p>...</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/106.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=106</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=106&amp;key=04524f62</trackback:ping></item><item><title>原创-使用Flex调试Flash编译的swf</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/105.html</link><pubDate>Tue, 29 Jul 2008 23:08:20 +0800</pubDate><guid>http://dmh2002.com/post/105.html</guid><description><![CDATA[<p>&nbsp;&nbsp; 最近公司进行项目开发，我负责主逻辑与部分功能模块的开发，使用的是flex3的AS 工程，而我的同事负责编写部分模块，但是只会只用flash的IDE，因为是外部加载入主逻辑后进行使用，所以除了不能共享库类之外</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/105.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=105</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=105&amp;key=3b3b4a6b</trackback:ping></item><item><title>在AS3中重置Array的几种方法的效率测试研究</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/101.html</link><pubDate>Tue, 29 Jul 2008 17:55:35 +0800</pubDate><guid>http://dmh2002.com/post/101.html</guid><description><![CDATA[<p>有时候我们需要将某个数组清空或者说重置，我最常用的办法的是重新new一下，但是有人测试研究发现使用length=0的方法，执行效率是最高的，呵呵，原文如下：</p><p>&nbsp;&nbsp;</p><p>_localArray.length = 0; // Reset the array to empty</p><p>Yesterday I was coding on a rather large application at work and I needed to reset an array I had that was stored as a member variable. My gut instinct was to just take the Array variable and set its length = 0. Although this worked I wasn't sure if it was the best way to reset an array in ActionScript 3. So I asked my friend <strong>Guy Wyatt</strong> and he sent me this performance benchmark using 100,000 iterations in an Array as a test to see the time it took to clear out this Array using various techniques.</p><p>...</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/101.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=101</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=101&amp;key=8c873dea</trackback:ping></item><item><title>字典和索引数组-提升性能小技巧</title><author>a@b.com (dmh2002)</author><link>http://dmh2002.com/post/104.html</link><pubDate>Tue, 29 Jul 2008 00:14:22 +0800</pubDate><guid>http://dmh2002.com/post/104.html</guid><description><![CDATA[<p>当你在客户端循环从大量的数据搜索指定数据的时候，这里有一个你可以提升额外性能的小技巧-那就是进肯能的使用字典和索引数组<br /><br />尝试着基于其属性寻找正确的对象，而不是在大量的数据间循环，如果使用字典或者是索引数组那么你可以快速的定位你所需要的数据而不需要任何的循环。字典和索引数组允许你在内存中存放 名-值对这样的索引，这样你就可以很快定位指定的数据<br /><br />在AS中你可以使用Object对象或者是Array对象来快速的创建这两者：<br /><br />...</p>]]></description><category>AS3 经验/技巧/游戏</category><comments>http://dmh2002.com/post/104.html#comment</comments><wfw:comment>http://dmh2002.com/</wfw:comment><wfw:commentRss>http://dmh2002.com/feed.asp?cmt=104</wfw:commentRss><trackback:ping>http://dmh2002.com/cmd.asp?act=tb&amp;id=104&amp;key=48061bd6</trackback:ping></item></channel></rss>
