'ac_runactContent.js querystring'에 해당되는 글 1건

  1. 2010/04/09 visualp Flash Querystrings in AC_RunActiveContent.js

'allowFullScreen', 'false',

'allowScriptAccess','sameDomain',

'movie', 'passtest',

'salign', "

); //end AC code

}

</script>

<noscript>

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="passtest" align="middle">

<param name="allowScriptAccess" value="sameDomain" />

<param name="allowFullScreen" value="false" />

<param name="movie" value="passtest.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="passtest.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="passtest" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

</object>

</noscript>

Assuming you want to pass the variable kittens=wonderful, because they are, this needs to be changed to (note changes in bold text):

<script language="javascript">

if (AC_FL_RunContent == 0) {

alert("This page requires AC_RunActiveContent.js.");

} else {

AC_FL_RunContent(

'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',

'width', '550',

'height', '400',

'src', 'passtest',

'quality', 'high',

'pluginspage', 'http://www.macromedia.com/go/getflashplayer',

'align', 'middle',

'play', 'true',

'loop', 'true',

'scale', 'showall',

'wmode', 'window',

'devicefont', 'false',

'id', 'passtest',

'bgcolor', '#ffffff',

'name', 'passtest',

'menu', 'true',

'allowFullScreen', 'false',

'allowScriptAccess','sameDomain',

'movie', 'passtest?kittens=wonderful',

'salign', "

); //end AC code

}

</script>

<noscript>

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="passtest" align="middle">

<param name="allowScriptAccess" value="sameDomain" />

<param name="allowFullScreen" value="false" />

<param name="movie" value="passtest.swf?kittens=wonderful" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="passtest.swf?kittens=wonderful" quality="high" bgcolor="#ffffff" width="550" height="400" name="passtest" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

</object>

</noscript>

The key bit not mentioned in the documentation is the first change in the first script block. The querystring needs to be appended to the movie (not SRC) parameter, and without the .swf in the filename.

Once this is done the variable kittens will now be available as _root.kittens. You can append several variables as you would in HTML (?thisvar=that&theother=somethingelse), and all must be URL encoded.

And that's it. Normal cats photos / train company problem posts will resume immediately.

Tags: , , , ,

2010/04/09 18:52 2010/04/09 18:52
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/236

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/236