Is it possible to get page URL into flash ?
Without using ExternalInteface.call('window.location')
trace(this.loaderInfo.url)
simply return URL from where flash was loaded.
Thank you.
Is it possible to get page URL into flash ?
Without using ExternalInteface.call('window.location')
trace(this.loaderInfo.url)
simply return URL from where flash was loaded.
Thank you.
You need to pass it to FlashVars
param in the HTML embed code.
To do this, add the following JS:
<script language="javascript">
var page_url = document.location.href;
</script>
Then pass that variable to Flash:
<script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0',
'pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash',
'width','550',
'height','440',
'src','myswffile',
'quality','high',
'movie','myswffile',
'flashvars', page_url
);
</script>
Note: the code above assumes you're using AC_RunActiveContent.js
javascript solution provided by Adobe.