<?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>zrong&#039;s Blog &#187; FlashPlayer</title>
	<atom:link href="http://zengrong.net/post/tag/flashplayer/feed" rel="self" type="application/rss+xml" />
	<link>http://zengrong.net</link>
	<description>Flash、Flex、RIA、web、Linux和我的生活</description>
	<lastBuildDate>Thu, 09 Feb 2012 15:09:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Flex编译器参数中-swf-version与-target-player之关系</title>
		<link>http://zengrong.net/post/1486.htm</link>
		<comments>http://zengrong.net/post/1486.htm#comments</comments>
		<pubDate>Sat, 03 Dec 2011 09:40:34 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[FlashPlayer]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1486</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1486.htm" title="Flex编译器参数中-swf-version与-target-player之关系"></a>今天下载了Flex 4.6 SDK后，发现framework/flex-config.xml中的默认-swf-version的值变成了14，而-target-player则变成了11.1。 记得在Flash Player 11发布的时候，为了能正常的编译面向Flash Player 11的swf文件，需要将-swf-version的值设置为13。以此推算，14这个值应该是针对Flash Player 11.1的。 那么-swf-version和-target-player的对应关系如何？见下表： flash Player版本 Flex SDK 版本 -swf-version -target-player 9 flex 3 9 9 10.0 flex 4.0 10 10.0.0 10.1 flex 4.1 10 10.1.0 10.2 flex 4.5和4.5.1 11 10.2.0 10.3 12 &#8230;<p class="read-more"><a href="http://zengrong.net/post/1486.htm">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1486.htm" title="Flex编译器参数中-swf-version与-target-player之关系"></a><p>今天下载了<a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.6">Flex 4.6 SDK</a>后，发现<code>framework/flex-config.xml</code>中的默认-swf-version的值变成了14，而-target-player则变成了11.1。</p>
<p>记得在Flash Player 11发布的时候，为了能正常的编译面向Flash Player 11的swf文件，需要将-swf-version的值设置为13。以此推算，14这个值应该是针对Flash Player 11.1的。</p>
<p>那么-swf-version和-target-player的对应关系如何？见下表：<span id="more-1486"></span></p>
<table>
<tr>
<td>flash Player版本</td>
<td>Flex SDK 版本</td>
<td>-swf-version</td>
<td>-target-player</td>
</tr>
<tr>
<td>9</td>
<td>flex 3</td>
<td>9</td>
<td>9</td>
</tr>
<tr>
<td>10.0</td>
<td>flex 4.0</td>
<td>10</td>
<td>10.0.0</td>
</tr>
<tr>
<td>10.1</td>
<td>flex 4.1</td>
<td>10</td>
<td>10.1.0</td>
</tr>
<tr>
<td>10.2</td>
<td>flex 4.5和4.5.1</td>
<td>11</td>
<td>10.2.0</td>
</tr>
<tr>
<td>10.3</td>
<td></td>
<td>12</td>
<td>10.3.0</td>
</tr>
<td>11.0</td>
<td></td>
<td>13</td>
<td>11.0.0</td>
</tr>
<tr>
<td>11.1</td>
<td>flex 4.6</td>
<td>14</td>
<td>11.1</td>
</tr>
</table>
<p>上面的这份表格，是根据<a href="http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ee0.html">Targeting Flash Player versions</a>整理出来的，但这个表格是<strong>不准确</strong>的。</p>
<p>因为，-swf-version的值能支持到那个程度，其实与Flex SDK并没有直接的关系，而是依赖于Flex SDK中的playerglobal.swc（位于frameworks/libs/player）。</p>
<p>打开Flex 4.6 SDK的frameworks/libs/player文件夹，可以看到其中只有一个11.1子文件夹，放置着针对Flash Player 11.1的playerglobal.swc。这个swc的作用有2个：</p>
<ol>
<li>在程序编写期间，Flash Builder使用它来提供自动完成功能。当然，如果直接用mxml编译器（<a href="http://zengrong.net/post/1307.htm">比如我</a>，就没有使用这个功能；</li>
<li>在程序编译期间，mxmlc编译器需要调用它。</li>
</ol>
<p>在每个新版本的Flash Player 11发布的时候，必须一起提供playerglobal.swc文件，也是这个原因。因为SDK的发布，和Flash Player的发布<strong>并非总是同步的</strong>。</p>
<p>在Flash 8时代，编译器和Flash Player是完全同步的。因为那时，只有Flash IDE可以生成swf文件。而Flex问世，以及MacroMedia被Adobe收购以后，Flash的发展就变得多样了，FlashIDE和Flex都可以生成swf文件，Flash Player的发展也更加独立。现在的情况，Flash CS，Flash Builder，Flex SDK，Flash Player的发布已经完全不同步了。尤其是当Adobe将Flex SDK交给Apache发展后，SDK的更新速度估计会更快。Adobe自己又会紧紧将Flash Player攥在手里，保持自己的步调来更新。（关于这段历史，我在<a href="http://zengrong.net/post/1295.htm">Actionscript,AS3,MXML,Flex,Flex Builder,Flash Builder,Flash,AIR,Flash Player之关系</a>一文中做了详述）</p>
<p>偏题了一会儿，现在回到正题：</p>
<p>Flex SDK可以和不同版本的Flash Player相配。即使是使用Flex SDK 3.6，同样也可以开发出Flash Player 11.1支持的swf程序。（当然，前提是不使用Flex frameworks提供的组件，仅仅使用Flash Player提供的API）。通过使用不同版本Flash Player提供的playerglobal.swc文件，就可以让旧的Flex SDK兼容新的-swf-version和 -target-player编译属性。当然，也可以让新的Flex SDK兼容旧的-swf-version和-target-player。</p>
<p>例如，目前Adobe官方提供的最新版（也是最终版）Flex SDK版本为4.6。根据Adobe的说法，这个版本的Flex SDK的最低支持的-target-player为11.1。这是因为frameworks/libs/player中仅仅提供了11.1版本的playerglobal.swc。我们可以将旧版本的playerglobal.swc复制到该目录下，并修改frameworks/flex-config.xml中的target-player标签，以改变Flex SDK默认编译的swf目标。当然，更方便和灵活的做法是在Flex项目的编译属性中设置-target-player属性。</p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1486.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>怎么看待Adobe停止移动版Flash播放器开发，而加大HTML5的开发？</title>
		<link>http://zengrong.net/post/1477.htm</link>
		<comments>http://zengrong.net/post/1477.htm#comments</comments>
		<pubDate>Mon, 14 Nov 2011 03:13:51 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlashPlayer]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1477</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1477.htm" title="怎么看待Adobe停止移动版Flash播放器开发，而加大HTML5的开发？"></a>这是我在知乎上的一个回答，原文：http://www.zhihu.com/question/19910415/answer/13337373 HTML5势不可挡，但Flash在视频、游戏方面依然有优势。 其实现在互联网上跟风叫嚣Flash烂的人，绝大多数都是没有深入过Flash开发的人。 Flash在技术上与HTML5+JS2+CSS3相比，目前还是有很多优势的： 比较完善的开发和调试环境； 统一的性能表现； Socket连接的支持； 优秀的摄像头和麦克风的支持； 统一的平台语言； 面向虚拟3D设备的编程。 但，Flash也有很多劣势： 不适合企业开发。Flex是一个优秀的框架，但性能始终差强人意，开发过程太过缓慢； 拥有大量不懂编程的“伪程序员和伪闪客”编写了大量影响浏览器性能的Flash小广告和小动画，影响了互联网上绝大多数不懂技术和不懂Flash编程技术的人对Flash技术的正确判断； 不专业。上面两点影响了所有人的判断（包括我），认为一个用Flash技术制作的企业网站是不专业的； 性能，还是性能。基于浏览器的性能和基于浏览器的插件的性能，谁可能做得更好？ 当然，上面说的大多数的优势与劣势，都是基于桌面平台的。Flash技术在移动平台上可以说是完败。JAVA都做不到的事情，Flash也做不到。Sun做不到的事情，Adobe更不可能做到。 Adobe一开始就走错了路，搞了个不伦不类的Flash Lite，居然现在还开发到4.0！如果一开始就走原生程序的路，现在或许会好很多。 AIR是个不错的东西，但还是被Adobe那龟速的开发时间表所拖累，先是放弃了Linux平台的用户与开发者，然后到了3.0才加上原生插件支持，结果现在都脱不了“玩具”的帽子。 Adobe放弃支持移动平台Flash Player，是希望集中精力用AIR统一移动开发平台，至于结果如何，就只有拭目以待了。]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1477.htm" title="怎么看待Adobe停止移动版Flash播放器开发，而加大HTML5的开发？"></a><p>这是我在知乎上的一个回答，原文：<a href="http://www.zhihu.com/question/19910415/answer/13337373">http://www.zhihu.com/question/19910415/answer/13337373</a></p>
<p>HTML5势不可挡，但Flash在视频、游戏方面依然有优势。</p>
<p>其实现在互联网上跟风叫嚣Flash烂的人，绝大多数都是没有深入过Flash开发的人。</p>
<p><strong>Flash在技术上与HTML5+JS2+CSS3相比，目前还是有很多优势的：</strong></p>
<ol>
<li>比较完善的开发和调试环境； </li>
<li>统一的性能表现； </li>
<li>Socket连接的支持； </li>
<li>优秀的摄像头和麦克风的支持； </li>
<li>统一的平台语言； </li>
<li>面向虚拟3D设备的编程。 </li>
</ol>
<p><strong>但，Flash也有很多劣势：</strong><span id="more-1477"></span></p>
<ol>
<li>不适合企业开发。Flex是一个优秀的框架，但性能始终差强人意，开发过程太过缓慢； </li>
<li>拥有大量不懂编程的“伪程序员和伪闪客”编写了大量影响浏览器性能的Flash小广告和小动画，影响了互联网上绝大多数不懂技术和不懂Flash编程技术的人对Flash技术的正确判断； </li>
<li>不专业。上面两点影响了所有人的判断（包括我），认为一个用Flash技术制作的企业网站是不专业的； </li>
<li>性能，还是性能。基于浏览器的性能和基于浏览器的插件的性能，谁可能做得更好？ </li>
</ol>
<p>当然，上面说的大多数的优势与劣势，都是基于桌面平台的。Flash技术在移动平台上可以说是完败。JAVA都做不到的事情，Flash也做不到。Sun做不到的事情，Adobe更不可能做到。</p>
<p>Adobe一开始就走错了路，搞了个不伦不类的Flash Lite，居然现在还开发到4.0！如果一开始就走原生程序的路，现在或许会好很多。</p>
<p>AIR是个不错的东西，但还是被Adobe那龟速的开发时间表所拖累，先是放弃了Linux平台的用户与开发者，然后到了3.0才加上原生插件支持，结果现在都脱不了“玩具”的帽子。</p>
<p>Adobe放弃支持移动平台Flash Player，是希望集中精力用AIR统一移动开发平台，至于结果如何，就只有拭目以待了。</p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1477.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adobe将停止基于移动设备浏览器的Flash Player开发</title>
		<link>http://zengrong.net/post/1473.htm</link>
		<comments>http://zengrong.net/post/1473.htm#comments</comments>
		<pubDate>Thu, 10 Nov 2011 06:13:49 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[FlashPlayer]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1473</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1473.htm" title="Adobe将停止基于移动设备浏览器的Flash Player开发"></a>美国时间11月9日消息：Adobe将停止基于移动设备浏览器的FlashPlayer开发，专注于基于移动设备的原生AIR应用程序。 英文原文：http://blogs.adobe.com/conversations/2011/11/flash-focus.html 7yue总结的中文要点： 个人认为，Adobe走了一步好棋。 Flash Player能做的，除了在浏览器中运行之外，AIR都能做； AIR能做的，Flash Player并不是都能做。 既然在移动设备中，原生程序才是王道，那何苦还开发费力不讨好的Flash Player？ AIR推出的最初原因就是为了打破浏览器对Flash的限制。在PC平台上，Adobe估计永远无法做到（Adobe今年6月也停止了Linux平台上的AIR开发）；那么现在在移动设备上有了做到的可能，Adobe当然要竭尽全力了。]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1473.htm" title="Adobe将停止基于移动设备浏览器的Flash Player开发"></a><p>美国时间11月9日消息：Adobe将停止基于移动设备浏览器的FlashPlayer开发，专注于基于移动设备的原生AIR应用程序。</p>
<ul>
<li>英文原文：<a href="http://blogs.adobe.com/conversations/2011/11/flash-focus.html">http://blogs.adobe.com/conversations/2011/11/flash-focus.html</a></li>
<li><a href="http://www.weibo.com/7yue" target="_blank">7yue</a>总结的中文要点：<br />
<a href="/wp-content/uploads/2011/11/flashmobileapps.jpg"><img src="http://zengrong.net/wp-content/uploads/2011/11/flashmobileapps-300x179.jpg" alt="" title="flashmobileapps" width="300" height="179" class="aligncenter size-medium wp-image-1474" /></a></li>
</ul>
<p><strong>个人认为，Adobe走了一步好棋。</strong></p>
<p>Flash Player能做的，除了在浏览器中运行之外，AIR都能做；<br />
AIR能做的，Flash Player并不是都能做。</p>
<p>既然在移动设备中，原生程序才是王道，那何苦还开发费力不讨好的Flash Player？</p>
<p>AIR推出的最初原因就是为了打破浏览器对Flash的限制。在PC平台上，Adobe估计永远无法做到（<a href="/post/1349.htm">Adobe今年6月也停止了Linux平台上的AIR开发</a>）；那么现在在移动设备上有了做到的可能，Adobe当然要竭尽全力了。</p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1473.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>怎样快速从其他语言转到Actionscript游戏开发</title>
		<link>http://zengrong.net/post/1471.htm</link>
		<comments>http://zengrong.net/post/1471.htm#comments</comments>
		<pubDate>Sun, 06 Nov 2011 06:11:28 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[FlashPlayer]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1471</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1471.htm" title="怎样快速从其他语言转到Actionscript游戏开发"></a>前段时间一个C#的同事转AS3，我给了他一些意见，他很顺利的转型了，现在已经可以适应RPG游戏开发。这些意见记录如下: 1.了解Flash Platform的全部技术。可以看看这篇文章：Actionscript,AS3,MXML,Flex,Flex Builder,Flash Builder,Flash,AIR,Flash Player之关系 2.在下面选择一本书籍在1周内看完： Flash ActionScript 3殿堂之路 ActionScript 3.0 Cookbook中文版 ActionScript 3.0编程精髓 这三本从难度上是从易到难，如果是有经验的开发者，建议看第三本《ActionScript 3.0编程精髓》，原因是足够深入。前面两本都很浅。 3.看完官方的ActionScript 3.0 开发人员指南 建议用1周，看不懂的跳过，碰到问题再来看。 4.把官方的用于 Adobe Flash Platform 的 ActionScript 3.0 参考浏览一遍，注意选择运行时和产品。 运行时中，AIR可以暂时不看； 产品中，可以只看Flash Professional CS5.5 和更早版本这个部分。 5.看完下面两本书： Flash ActionScript3.0动画教程 Flash ActionScript3.0动画高级教程 6.熟悉设计模式（如果以前不熟），建议在下面两本中选择一本（个人偏向第一本）： &#8230;<p class="read-more"><a href="http://zengrong.net/post/1471.htm">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1471.htm" title="怎样快速从其他语言转到Actionscript游戏开发"></a><p>前段时间一个C#的同事转AS3，我给了他一些意见，他很顺利的转型了，现在已经可以适应RPG游戏开发。这些意见记录如下:</p>
<p>1.了解Flash Platform的全部技术。可以看看这篇文章：<a href="http://zengrong.net/post/1295.htm">Actionscript,AS3,MXML,Flex,Flex Builder,Flash Builder,Flash,AIR,Flash Player之关系</a></p>
<p>2.在下面选择一本书籍在1周内看完：</p>
<ul>
<li><a href="http://book.douban.com/subject/2249511/">Flash ActionScript 3殿堂之路</a></li>
<li><a href="http://book.douban.com/subject/2367867/">ActionScript 3.0 Cookbook中文版</a></li>
<li><a href="http://book.douban.com/subject/3102069/">ActionScript 3.0编程精髓</a></li>
</ul>
<p>这三本从难度上是从易到难，如果是有经验的开发者，建议看第三本《ActionScript 3.0编程精髓》，原因是足够深入。前面两本都很浅。</p>
<p>3.看完官方的<a href="http://help.adobe.com/zh_CN/as3/dev/index.html">ActionScript 3.0 开发人员指南</a></p>
<p>建议用1周，看不懂的跳过，碰到问题再来看。<span id="more-1471"></span></p>
<p>4.把官方的<a href="http://help.adobe.com/zh_CN/FlashPlatform/reference/actionscript/3/index.html">用于 Adobe Flash Platform 的 ActionScript 3.0 参考</a>浏览一遍，注意选择运行时和产品。</p>
<ul>
<li>运行时中，AIR可以暂时不看；  </li>
<li>产品中，可以只看Flash Professional CS5.5 和更早版本这个部分。</li>
</ul>
<p>5.看完下面两本书：</p>
<ul>
<li><a href="http://book.douban.com/subject/3016575/">Flash ActionScript3.0动画教程</a></li>
<li><a href="http://book.douban.com/subject/4175538/">Flash ActionScript3.0动画高级教程</a></li>
</ul>
<p>6.熟悉设计模式（如果以前不熟），建议在下面两本中选择一本（个人偏向第一本）：</p>
<ul>
<li><a href="http://book.douban.com/subject/2243615/">Head First 设计模式</a></li>
<li><a href="http://book.douban.com/subject/4001015/">ActionScript 3.0设计模式</a></li>
</ul>
<p>7.熟悉一套UI框架，建议看这套：<a href="http://www.minimalcomps.com/">http://www.minimalcomps.com/</a>，然后自己写一套UI框架。</p>
<p>如果还想了解其他的UI框架，可以看这里：<a href="http://zengrong.net/flashassistant#UI">http://zengrong.net/flashassistant#UI</a></p>
<p>Flex是一套设计的非常不错的框架，有空可以看看源码。</p>
<p>8.这里还有一篇文章，可以参考一下：<a href="http://zengrong.net/post/1266.htm">有Flex应用基础，做游戏还需要学习什么</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1471.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Player 11应该在两周后发布</title>
		<link>http://zengrong.net/post/1451.htm</link>
		<comments>http://zengrong.net/post/1451.htm#comments</comments>
		<pubDate>Sat, 17 Sep 2011 03:20:17 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[FlashPlayer]]></category>
		<category><![CDATA[NetStream]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1451</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1451.htm" title="Flash Player 11应该在两周后发布"></a>2011-09-21:Adobe已经修正了我提交的这个bug，并在安全更新最后做出了感谢。但并非在v11中修正的，而是在v10.3.183.10中修正，安全更新在这里：http://www.adobe.com/support/security/bulletins/apsb11-26.html。所以我先前的推论可能不正确。但我想，Adobe很可能在10月3日的MAX大会上发布Flash Player 11。 今天Adobe给我发来邮件，告知我原来提交的关于FlashPlayer在执行NetStream.play的时候崩溃的问题已经解决，并询问我是否要加入安全公告致谢部分： Thank you again for sending us the Flash Player Netstream issue. This issue should be resolved in the upcoming release of Adobe Flash, currently planned for the next couple of weeks. Please let us know how &#8230;<p class="read-more"><a href="http://zengrong.net/post/1451.htm">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1451.htm" title="Flash Player 11应该在两周后发布"></a><p><span style="color:red">2011-09-21:</span>Adobe已经修正了我提交的这个bug，并在安全更新最后做出了感谢。但并非在v11中修正的，而是在v10.3.183.10中修正，安全更新在这里：<a href="http://www.adobe.com/support/security/bulletins/apsb11-26.html">http://www.adobe.com/support/security/bulletins/apsb11-26.html</a>。所以我先前的推论可能不正确。但我想，Adobe很可能在10月3日的MAX大会上发布Flash Player 11。</p>
<hr />
<p>今天Adobe给我发来邮件，告知我原来提交的关于<a href="http://zengrong.net/post/1390.htm">FlashPlayer在执行NetStream.play的时候崩溃</a>的问题已经解决，并询问我是否要加入安全公告致谢部分：</p>
<blockquote><p>
  Thank you again for sending us the Flash Player Netstream issue.  This issue should be resolved in the upcoming release of Adobe Flash, currently planned for the next couple of weeks.  Please let us know how you would like to be included in the Acknowledgements section of the upcoming Security Bulletin:
</p></blockquote>
<p>这样，也就说明Flash Player 11应该是在两周后发布。</p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1451.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>flashplayer crash on Netstream.play()</title>
		<link>http://zengrong.net/post/1400.htm</link>
		<comments>http://zengrong.net/post/1400.htm#comments</comments>
		<pubDate>Tue, 16 Aug 2011 01:23:21 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[FlashPlayer]]></category>
		<category><![CDATA[FMS]]></category>
		<category><![CDATA[NetStream]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1400</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1400.htm" title="flashplayer crash on Netstream.play()"></a>Thank smithfox translation,中文版 This is not a 100% frequency bug, I spent 3 days to debug it and I&#8217;m not sure I can duplicate it again. case: Connect to FMS Server using NetStream, once invoke method NetStream.play(&#8216;streamName&#8217;), the flash player &#8230;<p class="read-more"><a href="http://zengrong.net/post/1400.htm">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1400.htm" title="flashplayer crash on Netstream.play()"></a><p>Thank <a href="http://smithfox.com/" target="_blank">smithfox</a> translation,<a href="http://zengrong.net/post/1390.htm" title="FlashPlayer在执行NetStream.play的时候崩溃的解决办法">中文版</a></p>
<p>This is not a 100% frequency bug, I spent 3 days to debug it and I&#8217;m not sure I can duplicate it again.</p>
<h2>case:</h2>
<p>Connect to FMS Server using NetStream, once invoke method NetStream.play(&#8216;streamName&#8217;),  the flash player will crash.</p>
<p>all of flash player release have the same issue: single,debug,plugin</p>
<p>The bug will appear if satisfy the conditions below, ((but not all)</p>
<ol>
<li>Win7 OS</li>
<li>Play RTMP stream. RTMP stream can be published  by Flash Media Server(FMS) or Red5. In other words,  playing local flv/f4v/mp4 video have not this problem</li>
<li>the Stream contains audio</li>
<li>Use Frame meta to pre-load. if you do not understand Frame pre-load, see this article: <a href="http://www.bit-101.com/blog/?p=946" target="_blank">Preloaders in AS3</a>;</li>
<li>After complete pre-load, call &#8216;removeChild&#8217; to remove the pre-loaded instance of the class (BUG here).</li>
</ol>
<h2>Development and testing platform (appear BUG)</h2>
<ol>
<li>Flex SDK 4.5.1</li>
<li>Flash Media Server 4.0</li>
<li>Flash Player 10.3</li>
<li>Windows 7</li>
<li>Chrome12/Opera11.5/Firefox5/IE9</li>
</ol>
<p><span id="more-1400"></span></p>
<h2>BUG reproduction:</h2>
<p>I&#8217;ve wrote two simple Demo (one is sender，and another is receiver) to reproduce this bug. (Demo needs FMS support.)</p>
<p>The key is PreloaderNSPlay.as. As the pre-loaded class is no longer needed after the completion of loading, the general way is removing it from Stage. Bug will occur after removal (not occur immediately,</p>
<p>but in a time of receiving the audio stream). If using &#8216;visible&#8217; to hide pre-loaded classes, would not have this problem.</p>
<h2>Usage of the Demo (Here, the server is FMS)</h2>
<ol>
<li>Install FMS, create folder &#8216;/applications/testspeed/&#8217; under the installation directory</li>
<li>Compile NSPulish.as and NSPlay.as, or download the swf file directly.</li>
<li>Make sure that cameras and microphones are installed on your PC. run NSPublish.swf, click &#8220;connect&#8221; button, then view log to confirm the connection is OK,see the following figure.<br />
<img src="/wp-content/uploads/2011/07/nspub.png" alt="play the netstream" /></li>
<li>If client has been connected the FMS server successfully, we will can watch the cameras video, if the flash player still does not crash, let&#8217;s breath toward the microphone, &#8230;huuuuu&#8230;., the whole wold are quiet!!<br />
<img src="http://zengrong.net/wp-content/uploads/2011/07/nsplay.png" alt="crash" /></li>
</ol>
<h2>The full source code of the project is here:</h2>
<p><a href="https://github.com/zrong/blog/tree/master/flashplayer_crash_on_netstream_play/project">https://github.com/zrong/blog/tree/master/flashplayer_crash_on_netstream_play/project</a></p>
<p>NSPublish.as is the video publisher, NSPlay.as is the receiver. You can build the project using Ant, and you can change the SDK in build.properties file.</p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1400.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlashPlayer/AIR在new Vector(-1)的时候崩溃</title>
		<link>http://zengrong.net/post/1396.htm</link>
		<comments>http://zengrong.net/post/1396.htm#comments</comments>
		<pubDate>Thu, 04 Aug 2011 09:50:38 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[BUG]]></category>
		<category><![CDATA[FlashPlayer]]></category>
		<category><![CDATA[Vector]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1396</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1396.htm" title="FlashPlayer/AIR在new Vector(-1)的时候崩溃"><img width="431" height="139" src="http://zengrong.net/wp-content/uploads/2011/08/flashplayer_crash_vector.png" class="attachment-extra-featured-image wp-post-image" alt="ADL错误" title="flashplayer_crash_vector" /></a>source on github 试试这段代码： ?View Code ACTIONSCRIPTvar __length:int = -1; var __v:Vector.&#60;String&#62; = new Vector.&#60;String&#62;&#40;__length&#41;; 如果你用Flash builder编译，不会显示任何错误。编译后的swf无法双击打开，或打开后立即退出。 如果你用编译的是AIR程序，程序运行后会立即崩溃，同时弹出下面的提示信息: 如果你用Flash IDE来编译，则会看到错误提示： Error: Error #1000: 系统内存不足。 at Vector$object/set length() at Vector$object() at aaa_fla::MainTimeline/frame1() 这本来不是什么大问题，毕竟极少极少有人会使用 -1 这个值来作为Vector的length属性。 可是，起码给点提示好不好？起码让我不要找错方向！ 测试平台： FlashPlayer 10.3 Flash Builder &#8230;<p class="read-more"><a href="http://zengrong.net/post/1396.htm">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1396.htm" title="FlashPlayer/AIR在new Vector(-1)的时候崩溃"><img width="431" height="139" src="http://zengrong.net/wp-content/uploads/2011/08/flashplayer_crash_vector.png" class="attachment-extra-featured-image wp-post-image" alt="ADL错误" title="flashplayer_crash_vector" /></a><p><a href="https://github.com/zrong/blog/blob/master/flashplayer_crash_on_vector_create.md">source on github</a></p>
<p>试试这段代码：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1396code2'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13962"><td class="code" id="p1396code2"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> __length:<span style="color: #0066CC;">int</span> = -<span style="color: #cc66cc;">1</span>;
<span style="color: #000000; font-weight: bold;">var</span> __v:Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span> = <span style="color: #000000; font-weight: bold;">new</span> Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span>__length<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>如果你用Flash builder编译，不会显示任何错误。编译后的swf无法双击打开，或打开后立即退出。</p>
<p>如果你用编译的是AIR程序，程序运行后会立即崩溃，同时弹出下面的提示信息:<span id="more-1396"></span></p>
<p><img src="/wp-content/uploads/2011/08/flashplayer_crash_vector.png" alt="ADL错误" /></p>
<p>如果你用Flash IDE来编译，则会看到错误提示：</p>
<blockquote>
<p>Error: Error #1000: 系统内存不足。<br />
    at Vector$object/set length()<br />
    at Vector$object()<br />
    at aaa_fla::MainTimeline/frame1()</p>
</blockquote>
<p>这本来不是什么大问题，毕竟极少极少有人会使用 <code>-1</code> 这个值来作为Vector的length属性。</p>
<p>可是，起码给点提示好不好？起码让我不要找错方向！</p>
<p><strong>测试平台：</strong></p>
<ul>
<li>FlashPlayer 10.3</li>
<li>Flash Builder 4.5.1</li>
<li>Flex SDK 4.5.1</li>
<li>AIR 1.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1396.htm/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FlashPlayer在执行NetStream.play的时候崩溃的解决办法</title>
		<link>http://zengrong.net/post/1390.htm</link>
		<comments>http://zengrong.net/post/1390.htm#comments</comments>
		<pubDate>Sat, 30 Jul 2011 07:49:50 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[FlashPlayer]]></category>
		<category><![CDATA[FMS]]></category>
		<category><![CDATA[NetStream]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1390</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1390.htm" title="FlashPlayer在执行NetStream.play的时候崩溃的解决办法"></a>本文文章源码 本文项目源码 english 2011-09-21:Adobe已经修正了此bug，并在安全更新的致谢名单中列出了本博客：http://www.adobe.com/support/security/bulletins/apsb11-26.html 2011-09-17:Adobe确定该bug已在最新版本中解决，并询问我是否要加入安全公告致谢部分： Thank you again for sending us the Flash Player Netstream issue. This issue should be resolved in the upcoming release of Adobe Flash, currently planned for the next couple of weeks. Please let us know &#8230;<p class="read-more"><a href="http://zengrong.net/post/1390.htm">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1390.htm" title="FlashPlayer在执行NetStream.play的时候崩溃的解决办法"></a><ul>
<li><a href="https://github.com/zrong/blog/blob/master/flashplayer_crash_on_netstream_play.md">本文文章源码</a></li>
<li><a href="https://github.com/zrong/blog/tree/master/flashplayer_crash_on_netstream_play/project">本文项目源码</a></li>
<li>
<p><a href="http://zengrong.net/post/1400.htm">english</a></p>
</li>
<li>
<p><span style="color:red">2011-09-21:</span>Adobe已经修正了此bug，并在安全更新的致谢名单中列出了本博客：<a href="http://www.adobe.com/support/security/bulletins/apsb11-26.html">http://www.adobe.com/support/security/bulletins/apsb11-26.html</a></p>
</li>
<li><span style="color:red">2011-09-17:</span>Adobe确定该bug已在最新版本中解决，并询问我是否要加入安全公告致谢部分：</li>
</ul>
<blockquote><p>
  Thank you again for sending us the Flash Player Netstream issue.  This issue should be resolved in the upcoming release of Adobe Flash, currently planned for the next couple of weeks.  Please let us know how you would like to be included in the Acknowledgements section of the upcoming Security Bulletin:
</p></blockquote>
<ul>
<li><span style="color:red">2011-08-15:</span>Adobe再次回复，并声称解决了此BUG：</li>
</ul>
<blockquote><p>
  这个bug已经在内部修复了,该修复会被包含在flash player 11正式发布版当中。谢谢使用flash player!
</p></blockquote>
<ul>
<li><span style="color:red">2011-08-10:</span>Adobe回复了此BUG：</li>
</ul>
<blockquote>
<p>Hello,<br />
  Thanks for your reporting of the issue  flashplayer crash on netstream play. We could reproduce the issue and it has been filed in our internal bug system. We are going to >investigate it ASAP. And any update to the it, we will let you know quickly. Thanks!</p>
</blockquote>
<ul>
<li><span style="color:red">2011-08-09:</span>向Adobe提交了此BUG</li>
</ul>
<hr />
<p>这是个隐藏非常深的BUG，我都怀疑如果再做一次，我能不能把它找出来。它耗费了我宝贵的三天时间，三天啊……</p>
<h2>BUG表现</h2>
<p>在使用NetStream连接FMS发布的流，并执行NetStream.play(&#8216;streamName&#8217;)方法时，FlashPlayer会崩溃。独立版、调试版以及基于浏览器的插件版均如此。</p>
<p>但是，这还不是全部。必须满足以下几点，该BUG才会出现。</p>
<ul>
<li>使用Windows 7操作系统。也就是说，Windows XP不会出现这个问题；</li>
<li>播放的必须是RTMP流，RTMP流可以由<a href="http://www.adobe.com/products/flashmediaserver/">Flash Media Server</a>或者<a href="http://www.red5.org/">Red5</a>来发布。也就是说，使用NetStream播放本地的flv/f4v/mp4视频不会出现这个问题；</li>
<li>播放的流包含音频。也就是说，如果该流只包含视频，不会出现这个问题；</li>
<li>播放的流中包含的音频声音较大。也就是说，即使该流包含音频，但如果发布方没有发出声音，或者发出的声音很小，该问题不会出现；当然，不需要很大的声音就能让播放端立即崩溃；</li>
<li>使用了Frame标签来做预加载。不了解Frame标签预加载的，看这篇文章：<a href="http://www.bit-101.com/blog/?p=946">Preloaders in AS3</a>;</li>
<li>在预加载完毕之后，使用removeChild移除了预加载类的实例（<strong>BUG就在这里</strong>）。</li>
</ul>
<p><span id="more-1390"></span></p>
<h2>开发和测试平台(出现BUG的平台)</h2>
<ul>
<li>Flex SDK 4.5.1</li>
<li>Flash Media Server 4.0</li>
<li>Flash Player 10.3独立版/调试版/插件版</li>
<li>Windows 7 旗舰版</li>
<li>Chrome12/Opera11.5/Firefox5/IE9</li>
</ul>
<h2>BUG再现</h2>
<p>我写了两个简单的Demo（一个发布端，一个接收端）来重现这个BUG。Demo需要FMS的支持。</p>
<p>错误的重点在于预加载类(PreloaderNSPlay.as)。由于预加载类在完成加载后就不再需要，一般的处理方法是将其从Stage中移除。只要将移除，就会出现这个BUG（并非移除后立即出现，而是在接收音频流的时候出现）。而如果使用visible将预加载类隐藏，就不会出现这个问题。</p>
<p>Demo的使用方法（服务端以FMS为例）：</p>
<ol>
<li>安装FMS，在安装目录下建立 <code>/applications/testspeed/</code> 文件夹；</li>
<li>编译NSPulish.as和NSPlay.as，或者<a href="https://github.com/zrong/blog/tree/master/flashplayer_crash_on_netstream_play/project/bin">在这里直接下载swf文件</a>；</li>
<li>确认本机安装了摄像头和麦克风，运行NSPublish.swf，单击“连接”按钮，查看log信息确定连接正常，见下图：<br />
<a href="/wp-content/uploads/2011/07/nspub.png"><img src="/wp-content/uploads/2011/07/nspub.png" alt="播放视频" title="播放视频" width="329" height="412" class="aligncenter size-full wp-image-1391" /></a></li>
<li>运行NSPlay.swf，单击“连接”按钮，查看log信息确认连接正常。此时会看到发布端的摄像头视频。如果FlashPlaye没有崩溃的话，就向着麦克风吹口气……呼……整个世界清静了……<br />
<a href="/wp-content/uploads/2011/07/nsplay.png"><img src="/wp-content/uploads/2011/07/nsplay.png" alt="发布视频" title="发布视频" width="615" height="433" class="aligncenter size-full wp-image-1392" /></a></li>
</ol>
<p>下面只贴出了 <code>PreloaderNSPlay.as</code> 的源码，需要整个项目源码可以在这里下载：<a href="https://github.com/zrong/blog/tree/master/flashplayer_crash_on_netstream_play/project">https://github.com/zrong/blog/tree/master/flashplayer_crash_on_netstream_play/project</a></p>
<p>其中，NSPublish.as是视频发布方，NSPlay.as是视频接收方。可以在build.properties中配置好SDK地址，直接用Ant编译。</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://zengrong.net/wp-content/plugins/wp-codebox/wp-codebox.php?p=1390&amp;download=PreloaderNSPlay.as">PreloaderNSPlay.as</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13904"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
</pre></td><td class="code" id="p1390code4"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageAlign</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageScaleMode</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">ProgressEvent</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">getDefinitionByName</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PreloaderNSPlay <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> 
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PreloaderNSPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        _mainClassName = <span style="color: #ff0000;">'NSPlay'</span>;
        <span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;
        <span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP_LEFT</span>;
        <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">showDefaultContextMenu</span> = <span style="color: #000000; font-weight: bold;">false</span>;
        _tf = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        _tf.<span style="color: #006600;">defaultTextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #cc66cc;">12</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #ff0000;">&quot;center&quot;</span><span style="color: #66cc66;">&#41;</span>;
        _tf.<span style="color: #006600;">mouseEnabled</span> = <span style="color: #000000; font-weight: bold;">false</span>;
        _tf.<span style="color: #0066CC;">height</span> = <span style="color: #cc66cc;">20</span>;
        _tf.<span style="color: #006600;">x</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>-_tf.<span style="color: #0066CC;">width</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span>.5;
        _tf.<span style="color: #006600;">y</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">*</span>.5;
        <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_tf<span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #0066CC;">this</span>.<span style="color: #006600;">loaderInfo</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ProgressEvent.<span style="color: #006600;">PROGRESS</span>,progress<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">this</span>.<span style="color: #006600;">loaderInfo</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>,complete<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    protected <span style="color: #000000; font-weight: bold;">var</span> _tf:<span style="color: #0066CC;">TextField</span>;
    protected <span style="color: #000000; font-weight: bold;">var</span> _mainClassName:<span style="color: #0066CC;">String</span>;
&nbsp;
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> progress<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:ProgressEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
    <span style="color: #66cc66;">&#123;</span>
        _tf.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">bytesLoaded</span><span style="color: #66cc66;">/</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">bytesTotal</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #ff0000;">&quot;% 载入中……&quot;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> complete<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">gotoAndStop</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #000000; font-weight: bold;">var</span> mainClass:<span style="color: #000000; font-weight: bold;">Class</span> = <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #66cc66;">&#40;</span>getDefinitionByName<span style="color: #66cc66;">&#40;</span>_mainClassName<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> mainClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as DisplayObject<span style="color: #66cc66;">&#41;</span>;
        destroy<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> destroy<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">this</span>.<span style="color: #006600;">loaderInfo</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>ProgressEvent.<span style="color: #006600;">PROGRESS</span>,progress<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">this</span>.<span style="color: #006600;">loaderInfo</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>,complete<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #808080; font-style: italic;">//将预加载类从舞台移除(parent.removeChild也一样，因为parent就是舞台），就会导致Flash Player崩溃</span>
        <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #808080; font-style: italic;">//parent.removeChild(this);</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">//如果只移除显示进度的文本，或者只将自身隐藏而不移除，就不会出现这个Bug</span>
        <span style="color: #808080; font-style: italic;">//this.removeChild(_tf);</span>
        <span style="color: #808080; font-style: italic;">//this.visible = false;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1390.htm/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>[转]判断计算机显卡是否支持Adobe Flash Stage3D</title>
		<link>http://zengrong.net/post/1379.htm</link>
		<comments>http://zengrong.net/post/1379.htm#comments</comments>
		<pubDate>Fri, 15 Jul 2011 01:51:23 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[FlashPlayer]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1379</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1379.htm" title="[转]判断计算机显卡是否支持Adobe Flash Stage3D"></a>本文转自Perter&#8217;s Blog，稍作修改 Adobe Flash Player支持GPU加速的Stage3D功能无疑对未来的Web game渲染性能带来质的飞跃。目前包含这一功能的Flash Player 11 Beta版本已经发布在Adobe Labs。 或许很多开发者都有这样的问题，我如何知道哪些设备支持Stage3D呢？按下面方法即可获取到： 运行这个工具 http://zp.amsnet.pl/cdragan/d3dcaps.html 得到一个叫 ‘devcaps.txt’ 的文件。 查看两个着色器的值。如： VERTEX_SHADER_VERSION FFFE0300 PIXEL_SHADER_VERSION FFFF0300 忽略FFFE/FFFF, 只看红色部分的值，这个值必须都大于0200 才能支持molehill, 否则就软解。 注意，这两个值会在devcaps.txt文件中出现两次，用后面出现的那一组 （第一组的值是0101/0104，忽略即可）。]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1379.htm" title="[转]判断计算机显卡是否支持Adobe Flash Stage3D"></a><p>本文转自<a href="http://www.fans8.com/?p=690">Perter&#8217;s Blog</a>，稍作修改</p>
<p>Adobe Flash Player支持GPU加速的Stage3D功能无疑对未来的Web game渲染性能带来质的飞跃。目前包含这一功能的Flash Player 11 Beta版本已经发布在Adobe Labs。</p>
<p>或许很多开发者都有这样的问题，我如何知道哪些设备支持Stage3D呢？按下面方法即可获取到：</p>
<p>运行这个工具 <a href="http://zp.amsnet.pl/cdragan/d3dcaps.html">http://zp.amsnet.pl/cdragan/d3dcaps.html</a> 得到一个叫 ‘devcaps.txt’ 的文件。 查看两个着色器的值。如：</p>
<blockquote>
<p>VERTEX_SHADER_VERSION FFFE<span style="color:red;">0300</span><br />
  PIXEL_SHADER_VERSION  FFFF<span style="color:red;">0300</span></p>
</blockquote>
<p>忽略FFFE/FFFF, 只看红色部分的值，这个值必须都大于0200 才能支持molehill, 否则就软解。</p>
<p>注意，这两个值会在devcaps.txt文件中出现两次，用后面出现的那一组 （第一组的值是0101/0104，忽略即可）。</p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1379.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Beta(Flash Player 11+AIR3)新功能简介（中文版）</title>
		<link>http://zengrong.net/post/1375.htm</link>
		<comments>http://zengrong.net/post/1375.htm#comments</comments>
		<pubDate>Thu, 14 Jul 2011 13:09:11 +0000</pubDate>
		<dc:creator>zrong</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[FlashPlayer]]></category>

		<guid isPermaLink="false">http://zengrong.net/?p=1375</guid>
		<description><![CDATA[<a href="http://zengrong.net/post/1375.htm" title="Beta(Flash Player 11+AIR3)新功能简介（中文版）"></a>7月13日，Adobe Labels发布了Flash Player 11和AIR3的Beta，简介如下： 共同所有的新功能 基于显卡的3D渲染加速 给力啊……网页游戏界要洗牌了 支持对摄像头视频流进行H.264/AVC编码 基于FMS的视频聊天室可以更加清晰了 原生JSON格式支持 这个早就该有了，Adobe真是不思进取 支持手机设备上的G.711音频压缩 垃圾回收通告 虽然不能手动GC，但有这个也不错 三次贝塞尔曲线 安全的随机数生成器 受保护的HTTP动态流(HDS)和Flash访问增强 提供Socket进度事件 JPEG-XR格式支持 高分辨率位图支持 呵呵，终于可以不受那个该死的1677万像素的限制了 更高压缩比的SWF格式 改为LZMA（7z）压缩了，压缩比高达40% DisplayObjectContainer.removeChildren 和 MovieClip.isPlaying 有总比没有好，不是么？ 仅Flash Player所有的新功能 原生的64位操作系统支持 拖了这么多年，总算出来了 支持异步位图解码 TLS安全套接字支持 仅AIR3所有的新功能 高清视频硬件解码加速 同时支持移动设备，这个还不错。但Linux版终于离我们而去了 详细pdf下载链接（鸟语版，不喜勿下） 话说Flash Player 11 &#8230;<p class="read-more"><a href="http://zengrong.net/post/1375.htm">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://zengrong.net/post/1375.htm" title="Beta(Flash Player 11+AIR3)新功能简介（中文版）"></a><p>7月13日，<a href="http://labs.adobe.com/">Adobe Labels</a>发布了Flash Player 11和AIR3的Beta，简介如下：</p>
<h2>共同所有的新功能</h2>
<ul>
<li><strong>基于显卡的3D渲染加速</strong><br />
给力啊……网页游戏界要洗牌了</li>
<li><strong>支持对摄像头视频流进行H.264/AVC编码</strong><br />
基于FMS的视频聊天室可以更加清晰了</li>
<li><strong>原生JSON格式支持</strong><br />
这个早就该有了，Adobe真是不思进取</li>
<li><strong>支持手机设备上的G.711音频压缩</strong>  </li>
<li><strong>垃圾回收通告</strong><br />
虽然不能手动GC，但有这个也不错</li>
<li><strong>三次贝塞尔曲线</strong>  </li>
<li><strong>安全的随机数生成器</strong></li>
<li><strong>受保护的HTTP动态流(HDS)和Flash访问增强</strong>  </li>
<li><strong>提供Socket进度事件</strong>  </li>
<li><strong><a href="http://zh.wikipedia.org/wiki/JPEG_XR">JPEG-XR</a>格式支持</strong>  </li>
<li><strong>高分辨率位图支持</strong><br />
呵呵，终于可以不受那个该死的1677万像素的限制了</li>
<li><strong>更高压缩比的SWF格式</strong><br />
改为<a href="http://zh.wikipedia.org/wiki/LZMA">LZMA（7z）</a>压缩了，压缩比高达40%</li>
<li><strong>DisplayObjectContainer.removeChildren 和 MovieClip.isPlaying</strong><br />
有总比没有好，不是么？</li>
</ul>
<h2>仅Flash Player所有的新功能</h2>
<ul>
<li><strong>原生的64位操作系统支持</strong><br />
拖了这么多年，总算出来了</li>
<li><strong>支持异步位图解码</strong>  </li>
<li><strong><a href="http://zh.wikipedia.org/wiki/TLS">TLS</a>安全套接字支持</strong>  </li>
</ul>
<h2>仅AIR3所有的新功能</h2>
<ul>
<li><strong>高清视频硬件解码加速</strong><br />
同时支持移动设备，这个还不错。但<a href="http://zengrong.net/post/1349.htm">Linux版终于离我们而去了</a></li>
</ul>
<p><a href="http://download.macromedia.com/pub/labs/flashplatformruntimes/shared/flashplayer11_air3_b1_releasenotes_071311.pdf">详细pdf下载链接（鸟语版，不喜勿下）</a></p>
<p>话说Flash Player 11 beta的reference，原来在这里：<a href="http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/index.html">http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zengrong.net/post/1375.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

