![]() ![]() ![]() | 投稿するにはまず登録を |
![](images/pixel.gif)
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
ReyHori | Åê¹ÆNo.32528 投稿日時: 2007-3-17 2:00 |
新米 ![]() ![]() 居住地: 神奈川県川崎市 投稿: 20
使用環境:
|
Re: 別HTMLのswfへデータを渡すには ひろゆきさん、コメントをありがとうございます。
ご指摘の「(あるいは_blankウインドウを開いて)」は言葉足らずでしたが、同一ウインドウへ遷移させる場合と別ウインドウを開きたい場合が混在しているのです。説明不足についてはお詫びします。 ExternalInterface+Javascriptによるご提案、大変ありがたいです。早速検討に加えたいと思います。 これまでに述べた&試した方法の実際は次の通りです(目次:index.html、下層:test.html) ◆(1)の方法 [index.html上のindex.swfのボタンにActionScript] on (release) { import flash.external.*; ExternalInterface.call("fjmp", "test.html?code=001"); } [index.html上にJavascript] function fjmp (url) { location.href = url; } [test.html上にJavascript] document.write ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="(URL)" width="550" height="100" id="test" align="middle">'); document.write ('<param name="allowScriptAccess" value="always" />'); document.write ('<param name="movie" value="test.swf" />'); document.write ('<param name="quality" value="high" />'); document.write ('<param name="bgcolor" value="#ffffff" />'); document.write ('<param name="FlashVars" value="xid=' + location.search + '" />'); document.write ('<embed src="test.swf" quality="high" bgcolor="#ffffff" width="550" height="100" name="test" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="(URL)" swliveconnect="true" FlashVars="xid=' + location.search + '" />'); document.write ('</object>'); [test.html上のtest.swf上のタイムラインにActionScript] code = xid.substr (6); (以下codeを使った処理が続く想定) ◆(2)の方法 [index.html上のindex.swf上のタイムラインにActionScript] var so:SharedObject = SharedObject.getLocal("code", "/", false); [index.html上のindex.swf上のボタンにActionScript] on (release) { so.data.code = "001"; so.flush(); getURL ("test.html"); } [test.html上のtest.swf上のタイムラインにActionScript] var so:SharedObject = SharedObject.getLocal("code", "/", false); code = so.data.code; (以下codeを使った処理が続く想定) これからご教示戴いた方法をきちんと理解して確かめてみます。ありがとうございました。 |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
![]() |
ReyHori | 2007-3-16 0:08 |
![]() |
Fumio | 2007-3-16 0:24 |
![]() |
ReyHori | 2007-3-16 17:53 |
![]() |
ReyHori | 2007-3-17 0:44 |
![]() |
mayor | 2007-3-17 1:30 |
» ![]() |
ReyHori | 2007-3-17 2:00 |
![]() |
ReyHori | 2007-3-17 13:13 |
![]() |
Hiroike | 2007-3-16 0:56 |
![]() |
ReyHori | 2007-3-16 17:54 |
![]() |
ReyHori | 2007-3-16 23:10 |
![](images/pixel.gif)
投稿するにはまず登録を | |