<?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>RichMedia+ &#187; HTML5</title>
	<atom:link href="http://blog.richmediaplus.com/category/html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.richmediaplus.com</link>
	<description>About the Adobe&#039;s RIA related solution and technology, like Adobe Air, Adobe Flex, Mobile Dev. You also can find the SEO for Flex, RIA, User Ex in this blog.</description>
	<lastBuildDate>Fri, 16 Dec 2011 09:33:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hack Swiffy Runtime</title>
		<link>http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/</link>
		<comments>http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 03:20:34 +0000</pubDate>
		<dc:creator>Ticore Shih</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=898</guid>
		<description><![CDATA[由於 Google Swiffy 還不斷在修改，也沒有正式文件 很多 API 功能需要自行測試才會知道是否能用 雖然有支援基本 trace 功能，但是訊息都會變成一般字串輸出到 debug console 沒辦法像 JS or HTMLElement 物件那樣可以直接在 console 展開觀察屬性 另外，目前也不支援 ExternalInterface, fscommand 也不能讀取外部資料 可是明明都已經被轉成 JS 卻不能與 Swiffy runtime 外面 js 溝通取得 window, document，感覺這樣很笨 不過呢！測試著 function 時，突然發現以下的 AS 寫法 在轉換為 Swiffy 後，居然能取得 JS Window 物件！ function getDomWindow():Object{ return (function(){ return this; }).apply(null); } 有了 JS Window [...]
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/' rel='bookmark' title='從 Flash 跨網域警告發現瀏覽器安全性漏洞'>從 Flash 跨網域警告發現瀏覽器安全性漏洞</a></li>
<li><a href='http://blog.richmediaplus.com/2011/11/google-swiffy-swf-to-html5/' rel='bookmark' title='測試 Google Swiffy 轉換工具'>測試 Google Swiffy 轉換工具</a></li>
<li><a href='http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/' rel='bookmark' title='jQuery 1.6 data Bug'>jQuery 1.6 data Bug</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>由於 Google Swiffy 還不斷在修改，也沒有正式文件<br />
很多 API 功能需要自行測試才會知道是否能用<br />
雖然有支援基本 trace 功能，但是訊息都會變成一般字串輸出到 debug console<br />
沒辦法像 JS or HTMLElement 物件那樣可以直接在 console 展開觀察屬性</p>
<p>另外，目前也不支援 ExternalInterface, fscommand<br />
也不能讀取外部資料<br />
可是明明都已經被轉成 JS<br />
卻不能與 Swiffy runtime 外面 js 溝通取得 window, document，感覺這樣很笨</p>
<p>不過呢！測試著 function 時，突然發現以下的 AS 寫法<br />
在轉換為 Swiffy 後，居然能取得 JS Window 物件！</p>
<pre>
function getDomWindow():Object{
 return (function(){ return this; }).apply(null);
}
</pre>
<p>有了 JS Window 一切就好辦了<br />
可以直接呼叫 console.log 看看 runtime 裡的 _root 是什麼東西</p>
<pre>
getDomWindow().console.log(this);
</pre>
<p><a href="http://blog-uploads.richmediaplus.com/2011/11/HackSwiffyRuntime01.png"><img src="http://blog-uploads.richmediaplus.com/2011/11/HackSwiffyRuntime01-300x225.png" alt="" title="HackSwiffyRuntime01" width="300" height="225" class="alignnone size-medium wp-image-899" /></a></p>
<p>Swiffy runtime 的 _root 物件，所有屬性一覽無遺！<br />
接下來，想要在 Swiffy runtime 內與外部 JS 溝通，甚至讀取外部資料<br />
通通有解了吧！</p>
<p>以下示範從外部 JS 控制 Swiffy runtime 播放與停止功能<br />
先在 Flash 動畫內影格 1 加上以下 AS：</p>
<pre>
function getDomWindow():Object{
 return (function(){ return this; }).apply(null);
}

var window;

if (!window) {
 window = getDomWindow();
 window.runtimeStage = this;
}
</pre>
<p>輸出 Swiffy HTML 之後<br />
打開 HTML 文件多加上兩個按鈕就可以了</p>
<pre>
...
&lt;input type="button" value="stop" onClick="runtimeStage.stop();" /&gt;
&lt;input type="button" value="play" onClick="runtimeStage.play();" /&gt;
</pre>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/' rel='bookmark' title='從 Flash 跨網域警告發現瀏覽器安全性漏洞'>從 Flash 跨網域警告發現瀏覽器安全性漏洞</a></li>
<li><a href='http://blog.richmediaplus.com/2011/11/google-swiffy-swf-to-html5/' rel='bookmark' title='測試 Google Swiffy 轉換工具'>測試 Google Swiffy 轉換工具</a></li>
<li><a href='http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/' rel='bookmark' title='jQuery 1.6 data Bug'>jQuery 1.6 data Bug</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>測試 Google Swiffy 轉換工具</title>
		<link>http://blog.richmediaplus.com/2011/11/google-swiffy-swf-to-html5/</link>
		<comments>http://blog.richmediaplus.com/2011/11/google-swiffy-swf-to-html5/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 15:46:48 +0000</pubDate>
		<dc:creator>Ticore Shih</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=893</guid>
		<description><![CDATA[最近 Google 推出了 Swiffy Extension 可以將 Flash SWF 檔案轉換為 HTML5/JS 版本 只要是 Flash CS4 以上都可以安裝 目前最新版本為 Swiffy 3.6.1 轉換功能目前已經支援大部分 ActionScript 1.0, 2.0 語法 一般按鈕事件、Clip 事件都已經支援了 影格聲音只支援 Event Sound 只能跑一次，無法 Loop 文字欄位只支援靜態文字，不能用程式改變內容，也不能輸入 動畫部分沒仔細測試，不過看起來一般 Flash 5 動畫都能正常轉換了 實際拿十年前做的一些小東西來轉轉看 滑鼠拖尾效果 HTML5 版 : Flash 版 以高速左右移動模擬物件 blur fade out 效果 HTML5 版 : Flash 版 簡單的 CAI 依照動畫提示順序將 [...]
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/' rel='bookmark' title='Hack Swiffy Runtime'>Hack Swiffy Runtime</a></li>
<li><a href='http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/' rel='bookmark' title='jQuery 1.6 data Bug'>jQuery 1.6 data Bug</a></li>
<li><a href='http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/' rel='bookmark' title='從 Flash 跨網域警告發現瀏覽器安全性漏洞'>從 Flash 跨網域警告發現瀏覽器安全性漏洞</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>最近 Google 推出了 <a href="http://www.google.com/doubleclick/studio/swiffy/">Swiffy Extension</a> 可以將 Flash SWF 檔案轉換為 HTML5/JS 版本<br />
只要是 Flash CS4 以上都可以安裝<br />
目前最新版本為 Swiffy 3.6.1<br />
轉換功能目前已經支援大部分 ActionScript 1.0, 2.0 語法<br />
一般按鈕事件、Clip 事件都已經支援了<br />
影格聲音只支援 Event Sound 只能跑一次，無法 Loop<br />
文字欄位只支援靜態文字，不能用程式改變內容，也不能輸入<br />
動畫部分沒仔細測試，不過看起來一般 Flash 5 動畫都能正常轉換了</p>
<p>實際拿十年前做的一些小東西來轉轉看</p>
<p>滑鼠拖尾效果 <a href="http://dl.dropbox.com/u/9302854/SwiffyTest/Arrow9.swf.html">HTML5 版</a> : <a href="http://dl.dropbox.com/u/9302854/SwiffyTest/Arrow9.swf.html">Flash 版</a></p>
<p><a href="http://blog-uploads.richmediaplus.com/2011/11/SWFArrow9.png"><img src="http://blog-uploads.richmediaplus.com/2011/11/SWFArrow9-300x218.png" alt="" title="SWFArrow9" width="300" height="218" class="alignnone size-medium wp-image-894" /></a></p>
<p>以高速左右移動模擬物件 blur fade out 效果<br />
<a href="http://dl.dropbox.com/u/9302854/SwiffyTest/Transition_03.swf.html">HTML5 版</a> : <a href="http://dl.dropbox.com/u/9302854/SwiffyTest/Transition_03.swf">Flash 版</a></p>
<p><a href="http://blog-uploads.richmediaplus.com/2011/11/SWFBlurFadeOut.png"><img src="http://blog-uploads.richmediaplus.com/2011/11/SWFBlurFadeOut-300x218.png" alt="" title="SWFBlurFadeOut" width="300" height="218" class="alignnone size-medium wp-image-895" /></a></p>
<p>簡單的 CAI 依照動畫提示順序將 1-10 數字按一遍<br />
<a href="http://dl.dropbox.com/u/9302854/SwiffyTest/123.swf.html">HTML5 版</a> : <a href="http://dl.dropbox.com/u/9302854/SwiffyTest/123.swf">Flash 版</a></p>
<p><a href="http://blog-uploads.richmediaplus.com/2011/11/SWFCAI123.png"><img src="http://blog-uploads.richmediaplus.com/2011/11/SWFCAI123-300x222.png" alt="" title="SWFCAI123" width="300" height="222" class="alignnone size-medium wp-image-896" /></a></p>
<p>我知道這些東西看起來有點弱，不過十年前剛開始學 Flash 5 與程式只能做這種東西<br />
太複雜困難的東西，目前也無法轉成 HTML5<br />
即便如此，Flash Tool + Swiffy 大概是目前最好用的 HTML5 動畫、互動開發工具了<br />
你可以想像這些東西用文字編輯器 + PS 要刻多久嗎? 一個小互動 AD Banner 才多少?</p>
<p>需要注意的是 Swiffy 產生出來的 JSON 資料，經過 GZIP 壓縮後，檔案大小平均膨脹 13% 左右<br />
除此之外，還需要一個 Swify runtime.js<br />
以一個最簡單的例子做測試，僅在 frame 1 加上 AS: trace($version);<br />
產生的 HTML 如下：</p>
<pre>
&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Swiffy output&lt;/title&gt;
&lt;script src="http://www.gstatic.com/swiffy/v3.6/runtime.js"&gt;&lt;/script&gt;
&lt;script&gt;
swiffyobject = {"tags":[{"type":9,"actions":
[{"value":"$version","type":305},{"type":28},{"type":38}]},{"type":2}],
"v":"3.6.1","backgroundColor":16777215,
"frameSize":{"ymin":0,"ymax":4000,"xmin":0,"xmax":6000},
"frameCount":1,"frameRate":24,"version":8};
&lt;/script&gt;
&lt;/head&gt;
&lt;body style="overflow:hidden;margin:0;"&gt;
&lt;script&gt;var stage = new swiffy.Stage(document.body, swiffyobject);&lt;/script&gt;
&lt;script&gt;stage.start();&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>trace 結果會直接輸出到瀏覽器的 debug console 上<br />
假如想要傳入額外的參數到 HTML5 版的 Flash<br />
可以在 stage.start(); 之前呼叫：</p>
<pre>
stage.setFlashVars("clickTAG=http://www.google.com");
</pre>
<p>轉換時假如遇到不支援的物件或是語法，Swiffy 會出現警告訊息<br />
以下列出 Swiffy 3.6.1 可能會出現的 Warning 做為參考</p>
<p>Advanced text rendering using continuous stroke modulation is not supported.<br />
An unsupported ActionScript instruction was encountered.<br />
Blend modes are not supported.<br />
Different stroke cap styles for start and end are not supported.<br />
Filters are not supported by (Mobile) Safari.<br />
Input text is not supported<br />
Linear RGB color interpolation for gradients is not supported on certain platforms.<br />
Loading ActionScript variables from a URL is not supported.<br />
Loading a URL into a MovieClip is not supported.<br />
Miter limit will behave differently, as it will revert to bevel instead of cutting off the joint.<br />
Modifying the tab order is not supported.<br />
Streaming audio is not supported.<br />
The ActionScript class BitmapData is not supported.<br />
The ActionScript class BlurFilter is not supported.<br />
The ActionScript class Error is not supported.<br />
The ActionScript class LoadVars is not supported.<br />
The ActionScript class LocalConnection is not supported.<br />
The ActionScript class NetConnection is not supported.<br />
The ActionScript class Point is not supported.<br />
The ActionScript class Rectangle is not supported.<br />
The ActionScript class Sound is not supported.<br />
The ActionScript class TextFormat is not supported.<br />
The ActionScript class XML is not supported.<br />
The ActionScript class XMLSocket is not supported.<br />
The ActionScript function updateAfterEvent is not supported.<br />
The ActionScript method MovieClip.attachBitmap() is not supported.<br />
The ActionScript method MovieClip.beginFill() is not supported.<br />
The ActionScript method MovieClip.createEmptyMovieClip() is not supported.<br />
The ActionScript method MovieClip.createTextField() is not supported.<br />
The ActionScript method MovieClip.curveTo() is not supported.<br />
The ActionScript method MovieClip.endFill() is not supported.<br />
The ActionScript method MovieClip.getBytesLoaded() is not supported.<br />
The ActionScript method MovieClip.getBytesTotal() is not supported.<br />
The ActionScript method MovieClip.getDepth() is not supported.<br />
The ActionScript method MovieClip.getInstanceAtDepth() is not supported.<br />
The ActionScript method MovieClip.getNextHighestDepth() is not supported.<br />
The ActionScript method MovieClip.lineStyle() is not supported.<br />
The ActionScript method MovieClip.lineTo() is not supported.<br />
The ActionScript method MovieClip.loadMovie() is not supported.<br />
The ActionScript method MovieClip.moveTo() is not supported.<br />
The ActionScript method MovieClip.onRollOut() is not supported.<br />
The ActionScript method MovieClip.onRollOver() is not supported.<br />
The ActionScript method MovieClip.setMask() is not supported.<br />
The ActionScript method MovieClip.swapDepths() is not supported.<br />
The ActionScript method MovieClip.unloadMovie() is not supported.<br />
The ActionScript method Object.addProperty() is not supported.<br />
The ActionScript property arguments is not supported.<br />
The ActionScript property MovieClip.filters is not supported.<br />
The ActionScript property System.capabilities is not supported.<br />
The fscommand action is not supported.<br />
The global ActionScript property _accProps is not supported.<br />
The global ActionScript property _level1 is not supported.</p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/' rel='bookmark' title='Hack Swiffy Runtime'>Hack Swiffy Runtime</a></li>
<li><a href='http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/' rel='bookmark' title='jQuery 1.6 data Bug'>jQuery 1.6 data Bug</a></li>
<li><a href='http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/' rel='bookmark' title='從 Flash 跨網域警告發現瀏覽器安全性漏洞'>從 Flash 跨網域警告發現瀏覽器安全性漏洞</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2011/11/google-swiffy-swf-to-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>從 Flash 跨網域警告發現瀏覽器安全性漏洞</title>
		<link>http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/</link>
		<comments>http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 10:55:47 +0000</pubDate>
		<dc:creator>Ticore Shih</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=789</guid>
		<description><![CDATA[論壇上有人問到 Chrome 瀏覽器上跨域 iframe 會出現 Flash 安全性的警告 而且在 Google Code 上也有人提出相同的問題 http://code.google.com/p/swfobject/issues/detail?id=481 http://code.google.com/p/chromium/issues/detail?id=76748 反覆測試之後，將問題簡化如下： a.com 下的 HTML 網頁，包含一個 b.com 來的 iframe 網頁 b.com iframe 網頁內使用 javascript touch 一下 window.top.location a.com 在 onload 完成後，動態建立一 Flash 物件 Flash 物件內透過 ExternalInterface 呼叫任何 Javascript Function 得到以下錯誤訊息 SecurityError: Error #2060: 執行程序安全性違規：ExternalInterface 呼叫者 http://a.com/flash.swf 無法存取 [object]。 at flash.external::ExternalInterface$/_initJS() at flash.external::ExternalInterface$/call() at [...]
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/' rel='bookmark' title='Hack Swiffy Runtime'>Hack Swiffy Runtime</a></li>
<li><a href='http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/' rel='bookmark' title='jQuery 1.6 data Bug'>jQuery 1.6 data Bug</a></li>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>論壇上有人問到 <a href="http://bbs.9ria.com/thread-85933-1-1.html">Chrome 瀏覽器上跨域 iframe 會出現 Flash 安全性的警告</a><br />
而且在 Google Code 上也有人提出相同的問題<br />
<a href="http://code.google.com/p/swfobject/issues/detail?id=481">http://code.google.com/p/swfobject/issues/detail?id=481</a><br />
<a href="http://code.google.com/p/chromium/issues/detail?id=76748">http://code.google.com/p/chromium/issues/detail?id=76748</a></p>
<p>反覆測試之後，將問題簡化如下：</p>
<ol>
<li>a.com 下的 HTML 網頁，包含一個 b.com 來的 iframe 網頁</li>
<li>b.com iframe 網頁內使用 javascript touch 一下 window.top.location</li>
<li>a.com 在 onload 完成後，動態建立一 Flash 物件</li>
<li>Flash 物件內透過 ExternalInterface 呼叫任何 Javascript Function</li>
<li>得到以下錯誤訊息</li>
</ol>
<p><code>SecurityError: Error #2060: 執行程序安全性違規：ExternalInterface 呼叫者 http://a.com/flash.swf 無法存取 [object]。<br />
at flash.external::ExternalInterface$/_initJS()<br />
at flash.external::ExternalInterface$/call()<br />
at flash_fla::MainTimeline/doCallJs()</code></p>
<p>已經簡化成這樣，很明顯問題是出在 javascript window.top.location 物件上<br />
想要避免該問題，只要在主頁上一載入立即搶先 touch window.top.location 就好了</p>
<p>在測試過程中，還發現另一個更嚴重的問題<br />
跨域的 iframe 能夠透過原型鍊 prototype 插入任意 function 到 location 物件上<br />
讓 top window 頁面呼叫並傳遞任何物件<br />
不受跨網域安全性的限制</p>
<p>以下是實際的測試程式：</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">http://a.com/index01.html
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;title&gt;&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function onLoad() {
	console.log(&quot;'fun' in location: &quot;, &quot;fun&quot; in window.location);
	console.log(&quot;'fun' in document: &quot;, &quot;fun&quot; in document);
	if (&quot;fun&quot; in window.location)
		console.log(window.location.fun());
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onLoad=&quot;onLoad();&quot;&gt;
    &lt;iframe width=&quot;100&quot; height=&quot;100&quot;
    	src=&quot;http://b.com/index02.html&quot;&gt;
    &lt;/iframe&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">// http://b.com/index02.html
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
// Make sure touch top window location first in all frames, get the hook to inject function.
window.top.location;
//*/ Inject cross domain function via Object.prototype
Object.prototype.fun = function() {
	return(&quot;from iframe : &quot; + window.location);
};
//*/
/*/ Inject cross domain function via location.__proto__
window.location.__proto__.fun = function() {
	return(&quot;from iframe : &quot; + window.location);
};
//*/
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>實際用 Chrome 瀏覽器測試得到以下的結果</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">'fun' in location:  true
'fun' in document:  false
from iframe : http://b.com/index02.html</pre></div></div>

<p>跨網域 iframe 插入的 fun 真的能夠在主頁偵測到，並且呼叫之<br />
以上的 Bug 至少會發生在 Chrome 12.0.742.100 上</p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/' rel='bookmark' title='Hack Swiffy Runtime'>Hack Swiffy Runtime</a></li>
<li><a href='http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/' rel='bookmark' title='jQuery 1.6 data Bug'>jQuery 1.6 data Bug</a></li>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>正確避免浮點數計算偏差問題</title>
		<link>http://blog.richmediaplus.com/2011/05/avoid-folat-point-precision-issue/</link>
		<comments>http://blog.richmediaplus.com/2011/05/avoid-folat-point-precision-issue/#comments</comments>
		<pubDate>Tue, 17 May 2011 02:52:21 +0000</pubDate>
		<dc:creator>Ticore Shih</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=752</guid>
		<description><![CDATA[不管是用哪一種語言，只要關於浮點數運算一定會出現偏差 譬如 AS3 or Javascript 執行 152.2938 * 100 會輸出 15229.380000000001 當然最精確的作法是改用大數 BigDecimal 類別 假如一般不需要用到那麼精確，又要避開浮點數運算偏差的問題 最常見的作法可能就是直接用浮點數乘 100，四捨五入之後再除以 100 了 網路上很多現成的 function 可以用 function roundFloat&#40;value:Number, divider:Number&#41;:Number&#123; return Math.round&#40;value * divider&#41; / divider; &#125; 問題來了，那個除數大小到底該怎樣決定呢? 你可能會覺得很簡單，需要精確到小數下兩位就用 100，精確到三位就用 1000 可是這樣的用法正確嗎? 雙精度浮點數有效位數是 15-16 位 整數位數多，小數有效位數就減少，反之亦然 倘若整數占了 13 位，算式精確到小數 3 位只是自己騙自己而已 倘若整數占了 3 位，算式精確到小數 3 位則是浪費浮點數的有效位數 很明顯固定抓小數 3 位的作法無法適用絕大部分情況 假如需要計算整數位數少，小數位數多情況 [...]
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/05/decide-folat-point-precision/' rel='bookmark' title='決定浮點數有效位數'>決定浮點數有效位數</a></li>
<li><a href='http://blog.richmediaplus.com/2010/12/flex-flash-function/' rel='bookmark' title='Flex / Flash 性能优化技巧之 function'>Flex / Flash 性能优化技巧之 function</a></li>
<li><a href='http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/' rel='bookmark' title='Hack Swiffy Runtime'>Hack Swiffy Runtime</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>不管是用哪一種語言，只要關於浮點數運算一定會出現偏差<br />
譬如 AS3 or Javascript 執行 152.2938 * 100<br />
會輸出 15229.380000000001<br />
當然最精確的作法是改用大數 BigDecimal 類別</p>
<p>假如一般不需要用到那麼精確，又要避開浮點數運算偏差的問題<br />
最常見的作法可能就是直接用浮點數乘 100，四捨五入之後再除以 100 了<br />
網路上很多現成的 function 可以用</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #339966; font-weight: bold;">function</span> roundFloat<span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">,</span> divider<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#123;</span>
 <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">round</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span> <span style="color: #000066; font-weight: bold;">*</span> divider<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">/</span> divider<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>問題來了，那個除數大小到底該怎樣決定呢?<br />
你可能會覺得很簡單，需要精確到小數下兩位就用 100，精確到三位就用 1000</p>
<p>可是這樣的用法正確嗎?</p>
<p>雙精度浮點數有效位數是 15-16 位<br />
整數位數多，小數有效位數就減少，反之亦然<br />
倘若整數占了 13 位，算式精確到小數 3 位只是自己騙自己而已<br />
倘若整數占了 3 位，算式精確到小數 3 位則是浪費浮點數的有效位數</p>
<p>很明顯固定抓小數 3 位的作法無法適用絕大部分情況<br />
假如需要計算整數位數少，小數位數多情況<br />
就增加 divider 參數，反之就要縮小 divider<br />
無法用同一個算式計算大小不同的數值<br />
這樣寫法實在有點笨</p>
<p>而且上面 function 內容真的很少，為了這問題<br />
所有的地方都要 import 並呼叫這個 function<br />
好像有點過頭了<br />
倘若全部都改成 inline 的算式好像又顯得雜亂<br />
畢竟每個地方用到的 divider 大小可能不一樣</p>
<p>以下分享一個更簡單的作法，且能更有效的利用浮點數所有的有效位數<br />
利用 Number.toPrecision 指定轉成固定精確度 15 的字串<br />
這樣一轉，有效位數外的浮點數計算偏差就被去除掉了<br />
然後再用 parseFloat 轉回浮點數</p>
<p>實際測試範例：</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// 整數位數五位的情況，能夠進行到小數下 8 位的運算不受偏差影響</span>
<span style="color: #6699cc; font-weight: bold;">var</span> no<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">152.2938</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #000000; font-weight:bold;">0.00000001</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>no<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #009900; font-style: italic;">// 15229.380000010002 &amp;lt;- 浮點數計算偏差</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">parseFloat</span><span style="color: #000000;">&#40;</span>no<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toPrecision</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">15</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #009900; font-style: italic;">// 15229.38000001 &lt;- 修正浮點數計算偏差</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// 整數位數 10 位的情況，能夠進行到小數下 3 位的運算不受偏差影響</span>
<span style="color: #6699cc; font-weight: bold;">var</span> no<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">1234567890</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">9</span> <span style="color: #000066; font-weight: bold;">;</span> <span style="color: #000066; font-weight: bold;">++</span>i<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
 <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>no <span style="color: #000066; font-weight: bold;">+</span>= <span style="color: #000000; font-weight:bold;">0.011</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
 <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>no = <span style="color: #004993;">parseFloat</span><span style="color: #000000;">&#40;</span>no<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toPrecision</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">15</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #009966; font-style: italic;">/*/</span>
<span style="color: #000000; font-weight:bold;">1234567890.011</span>
<span style="color: #000000; font-weight:bold;">1234567890.011</span>
<span style="color: #000000; font-weight:bold;">1234567890.0219998</span>  <span style="color: #000066; font-weight: bold;">&lt;-</span> 浮點數計算偏差
<span style="color: #000000; font-weight:bold;">1234567890.022</span>      <span style="color: #000066; font-weight: bold;">&lt;-</span> 修正浮點數計算偏差
<span style="color: #000000; font-weight:bold;">1234567890.033</span>
<span style="color: #000000; font-weight:bold;">1234567890.033</span>
<span style="color: #000000; font-weight:bold;">1234567890.044</span>
<span style="color: #000000; font-weight:bold;">1234567890.044</span>
<span style="color: #000000; font-weight:bold;">1234567890.0549998</span>  <span style="color: #000066; font-weight: bold;">&lt;-</span> 浮點數計算偏差
<span style="color: #000000; font-weight:bold;">1234567890.055</span>      <span style="color: #000066; font-weight: bold;">&lt;-</span> 修正浮點數計算偏差
<span style="color: #000000; font-weight:bold;">1234567890.066</span>
<span style="color: #000000; font-weight:bold;">1234567890.066</span>
<span style="color: #000000; font-weight:bold;">1234567890.077</span>
<span style="color: #000000; font-weight:bold;">1234567890.077</span>
<span style="color: #000000; font-weight:bold;">1234567890.0879998</span>  <span style="color: #000066; font-weight: bold;">&lt;-</span> 浮點數計算偏差
<span style="color: #000000; font-weight:bold;">1234567890.088</span>      <span style="color: #000066; font-weight: bold;">&lt;-</span> 修正浮點數計算偏差
<span style="color: #000000; font-weight:bold;">1234567890.099</span>
<span style="color: #000000; font-weight:bold;">1234567890.099</span>
<span style="color: #009900; font-style: italic;">//*/</span></pre></div></div>

<p><del datetime="2011-05-17T05:55:41+00:00">除了 Number.toPrecision 之外也可以使用 Number.toExponential<br />
trace(Number(no.toExponential(15)));</del><br />
AS3 不能用 toExponential，它似乎不會四捨五入<br />
trace((0.3213).toExponential(10)); // 3.2129999999e-1</p>
<p>以上的方式簡單到根本沒有必要獨立寫成一個 function，<del datetime="2011-05-17T08:40:25+00:00">也不需要設置不同參數</del><br />
一律 inline 使用就好了<br />
需要注意的是 Precision 的取捨，看運算的數值多大，需要決定不同的 Precision</p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2011/05/decide-folat-point-precision/' rel='bookmark' title='決定浮點數有效位數'>決定浮點數有效位數</a></li>
<li><a href='http://blog.richmediaplus.com/2010/12/flex-flash-function/' rel='bookmark' title='Flex / Flash 性能优化技巧之 function'>Flex / Flash 性能优化技巧之 function</a></li>
<li><a href='http://blog.richmediaplus.com/2011/11/hack-swiffy-runtime/' rel='bookmark' title='Hack Swiffy Runtime'>Hack Swiffy Runtime</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2011/05/avoid-folat-point-precision-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.6 data Bug</title>
		<link>http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/</link>
		<comments>http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/#comments</comments>
		<pubDate>Thu, 05 May 2011 05:36:57 +0000</pubDate>
		<dc:creator>Ticore Shih</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=750</guid>
		<description><![CDATA[最近 jQuery 更新到 1.6 版，雖然我沒有在用 可是還是測試看看新功能 結果發現新的 data 功能有 bug jQuery 1.6 data() bug demo code: &#60;!DOCTYPE HTML&#62; &#60;html&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34;&#62; &#60;title&#62;jQuery 1.6 data() Bug&#60;/title&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;jquery-1.6.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34;&#62; $&#40;function &#40;&#41; &#123; $&#40;&#34;span&#34;&#41;.each&#40;function&#40;&#41;&#123; console.log&#40;JSON.stringify&#40;$&#40;this&#41;.data&#40;&#41;&#41;&#41;; &#125;&#41;; &#125;&#41;; &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;span data-x=&#34;data&#34; /&#62; &#60;span data-x-x=&#34;data&#34; /&#62; &#60;span data-x-x-x=&#34;data&#34; /&#62; &#60;span data-x-xx-x=&#34;data&#34; /&#62; [...]
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
<li><a href='http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/' rel='bookmark' title='從 Flash 跨網域警告發現瀏覽器安全性漏洞'>從 Flash 跨網域警告發現瀏覽器安全性漏洞</a></li>
<li><a href='http://blog.richmediaplus.com/2009/03/chromeexperiments/' rel='bookmark' title='Chrome Javascript Experience in ChromeExperiments.Com'>Chrome Javascript Experience in ChromeExperiments.Com</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>最近 <a href="http://blog.jquery.com/2011/05/03/jquery-16-released/" target="_blank">jQuery 更新到 1.6 版</a>，雖然我沒有在用<br />
可是還是測試看看新功能<br />
結果發現新的 data 功能有 bug</p>
<p>jQuery 1.6 data() bug demo code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
&lt;title&gt;jQuery 1.6 data() Bug&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.6.js&quot;&gt;&lt;/script&gt;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;span&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>JSON.<span style="color: #660066;">stringify</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">data</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
&lt;/head&gt;
&lt;body&gt;
&lt;span data-x=&quot;data&quot; /&gt;
&lt;span data-x-x=&quot;data&quot; /&gt;
&lt;span data-x-x-x=&quot;data&quot; /&gt;
&lt;span data-x-xx-x=&quot;data&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>用 Chrome 瀏覽器執行輸出結果</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;data&quot;</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;xX&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;data&quot;</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;xXxX&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;data&quot;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>實在令人搞不懂，為什麼 data attribute 這樣寫 data-x-x-x 就不能 parse 了呢?<br />
其它三個類似的寫法卻又可以正常 work</p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
<li><a href='http://blog.richmediaplus.com/2011/06/js-cross-domain-inject-issue/' rel='bookmark' title='從 Flash 跨網域警告發現瀏覽器安全性漏洞'>從 Flash 跨網域警告發現瀏覽器安全性漏洞</a></li>
<li><a href='http://blog.richmediaplus.com/2009/03/chromeexperiments/' rel='bookmark' title='Chrome Javascript Experience in ChromeExperiments.Com'>Chrome Javascript Experience in ChromeExperiments.Com</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2011/05/jquery-1-6-data-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5创意 – Rumpetroll</title>
		<link>http://blog.richmediaplus.com/2010/11/rumpetroll/</link>
		<comments>http://blog.richmediaplus.com/2010/11/rumpetroll/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 07:53:28 +0000</pubDate>
		<dc:creator>Alvin / Aedis.Ju</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Creative]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=696</guid>
		<description><![CDATA[创意无限，HTML5新的玩意 Rumpetroll 。 让我们每个人都变成小蝌蚪，在茫茫宇宙的大海中寻找有缘人，并且还可以自定义名字和与陌生人说话交谈哦。 Rumpetroll由HTML5，WebSockets，JavaScript和CSS 3进行编写，github主推的开放项目。 No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>创意无限，HTML5新的玩意 <a href="http://www.rumpetroll.com/" target="_blank">Rumpetroll</a> 。<br />
让我们每个人都变成小蝌蚪，在茫茫宇宙的大海中寻找有缘人，并且还可以自定义名字和与陌生人说话交谈哦。<br />
<img src="http://farm2.static.flickr.com/1205/5144795075_80f1cf0446.jpg" alt="Rumpetroll.com" /><br />
Rumpetroll由HTML5，WebSockets，JavaScript和CSS 3进行编写，github主推的开放项目。</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2010/11/rumpetroll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Flash in Chinese Link</title>
		<link>http://blog.richmediaplus.com/2010/04/thoughts-on-flash-in-chinese-link/</link>
		<comments>http://blog.richmediaplus.com/2010/04/thoughts-on-flash-in-chinese-link/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 01:54:10 +0000</pubDate>
		<dc:creator>Alvin / Aedis.Ju</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Steve Jobs]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=551</guid>
		<description><![CDATA[Apple CEO Steve Jobs 於網站上發表公開信 Thoughts on Flash， 急著看中文的朋友可以直接看全文翻譯 Steve Jobs ” Thoughts on Flash “全文翻譯 。 其實都是老話題了，總之，Adobe &#38; Apple 都不是好東西！都在鼓吹自己開放，開放個P啊！ Adobe 還是乖乖得做出 HTML5 開發工具吧！ Related posts: iPhone 4.0將對Flash to iPhone編譯器說不！ 開源JavaScript Flash Player(HTML5/SVG) Alvin眼中的Adobe
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/04/iphone-4-sdk-may-ban-flash-to-iphone-compilers/' rel='bookmark' title='iPhone 4.0將對Flash to iPhone編譯器說不！'>iPhone 4.0將對Flash to iPhone編譯器說不！</a></li>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
<li><a href='http://blog.richmediaplus.com/2010/02/alvin-in-the-eyes-of-the-adobe/' rel='bookmark' title='Alvin眼中的Adobe'>Alvin眼中的Adobe</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Apple CEO Steve Jobs 於網站上發表公開信 <a href="http://www.apple.com/hotnews/thoughts-on-flash/" target="_blank">Thoughts on Flash</a>， 急著看中文的朋友可以直接看全文翻譯 <a href="http://www.techbang.com.tw/posts/2405-steve-jobs-thoughts-on-flash-full-translation" target="_blank"><br />
Steve Jobs ” Thoughts on Flash “全文翻譯</a> 。</p>
<p>其實都是老話題了，總之，Adobe &amp; Apple 都不是好東西！都在鼓吹自己開放，開放個P啊！</p>
<p>Adobe 還是乖乖得做出 HTML5 開發工具吧！</p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/04/iphone-4-sdk-may-ban-flash-to-iphone-compilers/' rel='bookmark' title='iPhone 4.0將對Flash to iPhone編譯器說不！'>iPhone 4.0將對Flash to iPhone編譯器說不！</a></li>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
<li><a href='http://blog.richmediaplus.com/2010/02/alvin-in-the-eyes-of-the-adobe/' rel='bookmark' title='Alvin眼中的Adobe'>Alvin眼中的Adobe</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2010/04/thoughts-on-flash-in-chinese-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The HTML5 Test</title>
		<link>http://blog.richmediaplus.com/2010/04/the-html5-test/</link>
		<comments>http://blog.richmediaplus.com/2010/04/the-html5-test/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 03:27:21 +0000</pubDate>
		<dc:creator>Alvin / Aedis.Ju</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[HTML5 Test]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=547</guid>
		<description><![CDATA[Adobe FlashPlayer 有測試 Flashplayer version 的網站。 http://www.flashplayerversion.com/ HTML5 也有類似的測試，他測試的是您的瀏覽器支持HTML5的程度，包括了 H.264 codec support, MP3 codec support 等等。 http://html5test.com/ 總分是160分。 IE8.0.6001.18702    19/160 Apple Safari 4.0.4 70/160 Mozilla Firefox 3.6.3 101/160 Google Chrome 4.1.249.1064 118/160 Related posts: 開源JavaScript Flash Player(HTML5/SVG) Chrome Javascript Experience in ChromeExperiments.Com RGraph &#8211; Powerful HTML5 Graph Library
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
<li><a href='http://blog.richmediaplus.com/2009/03/chromeexperiments/' rel='bookmark' title='Chrome Javascript Experience in ChromeExperiments.Com'>Chrome Javascript Experience in ChromeExperiments.Com</a></li>
<li><a href='http://blog.richmediaplus.com/2010/04/rgraph-powerful-html5-graph-library/' rel='bookmark' title='RGraph &#8211; Powerful HTML5 Graph Library'>RGraph &#8211; Powerful HTML5 Graph Library</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Adobe FlashPlayer 有測試 Flashplayer version 的網站。<a href="http://www.flashplayerversion.com/" target="_blank"></p>
<p>http://www.flashplayerversion.com/</a></p>
<p>HTML5 也有類似的測試，他測試的是您的瀏覽器支持HTML5的程度，包括了 <em>H.264 codec support, MP3 codec support</em> 等等。<a href="http://html5test.com/" target="_blank"></p>
<p>http://html5test.com/</a></p>
<p>總分是160分。</p>
<p>IE8.0.6001.18702    <span style="color: #ff0000;">19</span>/<span style="color: #339966;">160</span><br />
Apple Safari 4.0.4   <span style="color: #ff0000;">70</span>/<span style="color: #339966;">160</span><br />
Mozilla Firefox 3.6.3   <span style="color: #ff0000;">101</span>/<span style="color: #339966;">160</span><br />
Google Chrome 4.1.249.1064   <span style="color: #ff0000;">118</span>/<span style="color: #339966;">160</span></p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
<li><a href='http://blog.richmediaplus.com/2009/03/chromeexperiments/' rel='bookmark' title='Chrome Javascript Experience in ChromeExperiments.Com'>Chrome Javascript Experience in ChromeExperiments.Com</a></li>
<li><a href='http://blog.richmediaplus.com/2010/04/rgraph-powerful-html5-graph-library/' rel='bookmark' title='RGraph &#8211; Powerful HTML5 Graph Library'>RGraph &#8211; Powerful HTML5 Graph Library</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2010/04/the-html5-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RGraph &#8211; Powerful HTML5 Graph Library</title>
		<link>http://blog.richmediaplus.com/2010/04/rgraph-powerful-html5-graph-library/</link>
		<comments>http://blog.richmediaplus.com/2010/04/rgraph-powerful-html5-graph-library/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 12:42:52 +0000</pubDate>
		<dc:creator>Alvin / Aedis.Ju</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[RGraph]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=529</guid>
		<description><![CDATA[RGraph 是一款基于 HTML5 Canvas 的一個 graph library，擁有簡單的互動體驗。 Bar chart[examples] [documentation] Bi-polar chart[examples] [documentation] Donut chart[examples] [documentation] Funnel chart[examples] [documentation] Gantt chart[examples] [documentation] Horizontal Bar chart[examples] [documentation] LED grid[examples] [documentation] Line chart[examples] [documentation] Meter[examples] [documentation] Odometer[examples] [documentation] Pie chart[examples] [documentation] Progress bar[examples] [documentation] Pseudo radar chart[examples] [documentation] Scatter chart[examples] [documentation] Traditional radar chart[examples] [documentation] RGraph 對個人使用免費。 [...]
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/04/the-html5-test/' rel='bookmark' title='The HTML5 Test'>The HTML5 Test</a></li>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rgraph.net/" target="_blank">RGraph</a> 是一款基于 HTML5 Canvas 的一個 graph library，擁有簡單的互動體驗。</p>
<ul>
<li>Bar chart[<a href="http://www.rgraph.net/examples/bar.html">examples</a>] [<a href="http://www.rgraph.net/docs/bar.html">documentation</a>]</li>
<li>Bi-polar chart[<a href="http://www.rgraph.net/examples/bipolar.html">examples</a>] [<a href="http://www.rgraph.net/docs/bipolar.html">documentation</a>]</li>
<li>Donut chart[<a href="http://www.rgraph.net/examples/donut.html">examples</a>] [<a href="http://www.rgraph.net/docs/donut.html">documentation</a>]</li>
<li>Funnel chart[<a href="http://www.rgraph.net/examples/funnel.html">examples</a>] [<a href="http://www.rgraph.net/docs/funnel.html">documentation</a>]</li>
<li>Gantt chart[<a href="http://www.rgraph.net/examples/gantt.html">examples</a>] [<a href="http://www.rgraph.net/docs/gantt.html">documentation</a>]</li>
<li>Horizontal Bar chart[<a href="http://www.rgraph.net/examples/hbar.html">examples</a>] [<a href="http://www.rgraph.net/docs/hbar.html">documentation</a>]</li>
<li>LED grid[<a href="http://www.rgraph.net/examples/led.html">examples</a>] [<a href="http://www.rgraph.net/docs/led.html">documentation</a>]</li>
<li>Line chart[<a href="http://www.rgraph.net/examples/line.html">examples</a>] [<a href="http://www.rgraph.net/docs/line.html">documentation</a>]</li>
<li>Meter[<a href="http://www.rgraph.net/examples/meter.html">examples</a>] [<a href="http://www.rgraph.net/docs/meter.html">documentation</a>]</li>
<li>Odometer[<a href="http://www.rgraph.net/examples/odo.html">examples</a>] [<a href="http://www.rgraph.net/docs/odo.html">documentation</a>]</li>
<li>Pie chart[<a href="http://www.rgraph.net/examples/pie.html">examples</a>] [<a href="http://www.rgraph.net/docs/pie.html">documentation</a>]</li>
<li>Progress bar[<a href="http://www.rgraph.net/examples/progress.html">examples</a>] [<a href="http://www.rgraph.net/docs/progress.html">documentation</a>]</li>
<li>Pseudo radar chart[<a href="http://www.rgraph.net/examples/radar.html">examples</a>] [<a href="http://www.rgraph.net/docs/radar.html">documentation</a>]</li>
<li>Scatter chart[<a href="http://www.rgraph.net/examples/scatter.html">examples</a>] [<a href="http://www.rgraph.net/docs/scatter.html">documentation</a>]</li>
<li>Traditional radar chart[<a href="http://www.rgraph.net/examples/tradar.html">examples</a>] [<a href="http://www.rgraph.net/docs/tradar.html">documentation</a>]</li>
</ul>
<p><a href="http://www.rgraph.net/" target="_blank">RGraph</a> 對個人使用免費。</p>
<p>HTML5的應用暫時肯定不會有大的發展，但讓我們開清了方向。</p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/04/the-html5-test/' rel='bookmark' title='The HTML5 Test'>The HTML5 Test</a></li>
<li><a href='http://blog.richmediaplus.com/2010/01/open-source-javascript-flashplayer-html5-svg/' rel='bookmark' title='開源JavaScript Flash Player(HTML5/SVG)'>開源JavaScript Flash Player(HTML5/SVG)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2010/04/rgraph-powerful-html5-graph-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alvin眼中的Adobe</title>
		<link>http://blog.richmediaplus.com/2010/02/alvin-in-the-eyes-of-the-adobe/</link>
		<comments>http://blog.richmediaplus.com/2010/02/alvin-in-the-eyes-of-the-adobe/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 16:03:13 +0000</pubDate>
		<dc:creator>Alvin / Aedis.Ju</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://blog.richmediaplus.com/?p=483</guid>
		<description><![CDATA[Steve Jobs在Apple內部大會上抨擊Adobe太懶惰，有潛力去做有意義的事情卻沒有那樣去做，將來沒人會用flash，大家都改用HTML5了。 我個人很認同Steve Jobs關于Adobe太懶惰的觀點，至于Flash最終會被HTML5代替，這要看是什么領域啦，Chrome和Firefox已經開始支持HTML5了，已經走出了非常重要的一步，人們老是說HTML5還需要10年的努力，但比起Flash來，HTML5是趨勢，這是不爭的事實。 純屬個人想法，Adobe Fans不要噴我！ Related posts: Thoughts on Flash in Chinese Link
Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/04/thoughts-on-flash-in-chinese-link/' rel='bookmark' title='Thoughts on Flash in Chinese Link'>Thoughts on Flash in Chinese Link</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><em>Steve Jobs在Apple內部大會上抨擊Adobe太懶惰，有潛力去做有意義的事情卻沒有那樣去做，將來沒人會用flash，大家都改用HTML5了。</em></p>
<p>我個人很認同Steve Jobs關于Adobe太懶惰的觀點，至于Flash最終會被HTML5代替，這要看是什么領域啦，Chrome和Firefox已經開始支持HTML5了，已經走出了非常重要的一步，人們老是說HTML5還需要10年的努力，但比起Flash來，HTML5是趨勢，這是不爭的事實。</p>
<p><em><strong>純屬個人想法，Adobe Fans不要噴我！</strong></em></p>
<p>Related posts:<ol>
<li><a href='http://blog.richmediaplus.com/2010/04/thoughts-on-flash-in-chinese-link/' rel='bookmark' title='Thoughts on Flash in Chinese Link'>Thoughts on Flash in Chinese Link</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.richmediaplus.com/2010/02/alvin-in-the-eyes-of-the-adobe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

