AS2 까지는 "_root.name" 이렇게 사용가능했지만. AS3부터는 안된다.
_root 대신 FlashVars 라는 것을 사용한다.

<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', 'VideoPlayerExample',
   'quality', 'high',
   'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
   'align', 'middle',
   'play', 'true',
   'loop', 'true',
   'scale', 'showall',
   'wmode', 'window',
   'devicefont', 'false',
   'id', 'VideoPlayerExample',
   'bgcolor', '#ffffff',
   'name', 'VideoPlayerExample',
   'menu', 'true',
   'allowFullScreen', 'false',
   'allowScriptAccess','sameDomain',
   'movie', 'VideoPlayerExample',
   'salign', '',
   'FlashVars', 'linkurl=http://shared.co.kr'
   ); //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="VideoPlayerExample" align="middle">
 <param name="allowScriptAccess" value="sameDomain" />
 <param name="allowFullScreen" value="false" />
 <param name="movie" value="VideoPlayerExample.swf" FlashVars="linkurl=http://shared.co.kr" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="VideoPlayerExample.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="VideoPlayerExample" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
 </object>
</noscript>

우선 위처럼 FlashVars 값을 입력해주고..
AS3 에서는

var linkUrl:String = loaderInfo.parameters.linkurl;

요렇게 사용하면 된다.

+ Recent posts