game.swf の場合
HTML側
| <SCRIPT Language="JavaScript" SRC="http://game.gr.jp/GameWeb/GameCenter/GRS0000000000/GRSmodule0000000000.js">
</SCRIPT> <SCRIPT LANGUAGE="JavaScript"> <!-- var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1; function game_DoFSCommand(command, args) { var gameObj = InternetExplorer ? astrike : document.astrike; if( command=="j_score" ) { GRS_score = args; GRS_sendScore(); } } // Hook for Internet Explorer
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id=game
GRS0000000000/GRSmodule0000000000.js
game
width=400 height=320
※3行目以降はFLASHでHTMLテンプレートを「FSCOMMANDサポート」としてパブリッシュすると
|
| FLASH側の処理です
fscommand("j_score",""+score); score:FLASHでスコア格納に使用する変数(数値)
|
HTML側
| <SCRIPT Language="JavaScript" SRC="http://game.gr.jp/GameWeb/GameCenter/GRS0000000000/GRSmodule0000000000.js">
</SCRIPT> <SCRIPT LANGUAGE="JavaScript"> <!-- function j_score(args) { GRS_score = args; GRS_sendScore(); }
GRS0000000000/GRSmodule0000000000.js
|
| FLASH側の処理です
getURL("javascript:j_score("+score+");"); score:FLASHでスコア格納に使用する変数(数値)
|