I have been having a problem passing information from a JS function back to the Flash
Here is my code
JS
Code:
<script language="javascript" type="text/javascript">
function test(){
if (navigator.appName.indexOf("Microsoft") != -1) {
window["FlashVars"].readRewardsText();
}else{
document["FlashVars"].readRewardsText();
}
}
</script>
/// BTN that calls the JS
<a href="#" onclick="test()"> Test</a>
/////Loadin the Flash
Code:
<script language="javascript">
/***********************************************
* Author: Moises Zaragoza
* Create date: 11/07/07
* Description: removes flash border
***********************************************/
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', '993',
'height', '520',
'src', 'FlashVars',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'opaque',
'devicefont', 'false',
'id', 'FlashVars',
'bgcolor', '#000000',
'name', 'FlashVars',
'menu', 'true',
'allowFullScreen', 'true',
'allowScriptAccess','sameDomain',
'movie', 'test.swf',
'salign', ''
); //end AC code
}
</script>
/// Inside flash at the root level
Code:
function readRewardsText() {
_root.clip1.start(0,1);
tester.text = "readRewardsText was called";
}
this.createEmptyMovieClip("redeemnow",this.getNextHighestDepth());
var clip1:Sound = new Sound(s1);
clip1.attachSound("redeemnow");
thanks for all the help