Aug 04, 2010
[Flash] Flash on IE6 は gzip 圧縮されたデータを読み込めない
意外と難儀な問題に当たったのでメモ。
現象
IE6 上の Flash Player から ActionScript の URLLoader 等を利用してサーバにデータを取りに行く際、 サーバが gzip で圧縮されたデータを返すと IOErrorEvent.IO_ERROR (Error #2032) が発生する。
回避方法
ActionScript の URLRequestHeader クラスには Accept-Encoding は指定できないとリファレンスに記載があるのでクライアントサイドでの回避は困難。
但し、未検証なので絶対に無理かは不明。
ざっと見た限りでは皆さんサーバサイドで gzip を OFF にして回避している模様。
・・・今の環境だとそんな設定許されないから悩ましい。
関連情報
dmpmorg の日記さんに丁寧な解説があった。多謝!!!
- dmpmorgの日記 - FlexのURLLoaderでIE6だけ「#2032: ストリームエラー」 原因はgzip?CommentsAdd Star
- http://d.hatena.ne.jp/dmpmorg/20090612/1244795718
- Flash not recieving xmls when embedded in IE and GZIP compression is enebled in IIS (server sending xml)
- http://bugs.adobe.com/jira/browse/FP-330
- GZip compression + Flash Player + IE6 = Nightmare
- http://www.ultrashock.com/forums/data-communication/gzip-compression-flash-player-ie6-nightmare-122911.html
[Flash] Open Flash Chart でデータを HTML 内に埋め込む方法
Open Flash Chart でチャート用の JSON データを HTML 内に埋め込む方法をメモ。
<script type="text/javascript" language="javascript" src="swfobject.js" ></script>
<script type="text/javascript">
var chartData = '{"elements":[{"type":"line","values":[1,2,3,4]}]}'; // ここにチャート用の JSON データを埋め込む。
swfobject.embedSWF("open-flash-chart.swf", "chart", "300", "300", "9.0.0", "expressInstall.swf", {"get-data":"getChartData"});
function getChartData() {
return chartData;
}
</script>
<div id="chart"></div>
"get-data" に JSON を返す JavaScript の function を指定するだけ。
詳細な情報は以下を参照のこと。
- Advanced : Many charts on one page
- http://teethgrinder.co.uk/open-flash-chart-2/adv-js-2-charts.php
Dec 17, 2009
[Flash] Flash Cookie に関するメモ
SharedObject、いわゆる Flash Cookie の関連情報をメモ。
- Flash CS3 ドキュメンテーション - 共有オブジェクト
- http://livedocs.adobe.com/flash/9.0_jp/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000361.html
- Flash CS3 ドキュメンテーション - ローカルデータの保存
- http://livedocs.adobe.com/flash/9.0_jp/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000319.html
- Flex ドキュメンテーション - Flex におけるローカル SharedObject の使用
- http://www.adobe.com/support/documentation/jp/flex/1/lsos/index.html
- Wikipedia - Local Shared Object
- http://ja.wikipedia.org/wiki/Local_Shared_Object
ローカルに保存されている Shared Object の設定、削除は以下のページで可能。
- Flash Player ヘルプ - 設定マネージャ
- http://www.macromedia.com/support/documentation/jp/flashplayer/help/settings_manager.html



