<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div><br></div><div>Ron, I think it's a one way street.</div><div>Julian wrapped the ExternalInterface.call method in a wrapper that allows Xerte to call outward (hence your initialization alert works).</div><div><span style="font-size: 12pt;">But there is no way set up to call inward (JS to AS).</span></div><div><br></div><br><div><hr id="stopSpelling">From: knowledgeware@kccsoft.com<br>To: xerte@lists.nottingham.ac.uk<br>Date: Thu, 16 Jan 2014 16:00:25 -0800<br>Subject: [Xerte] desktop xerte js syntax to call swf function<br><br><style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:11.0pt;
font-family:"Calibri","sans-serif";
}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}
.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}
.ExternalClass p.ecxMsoAcetate, .ExternalClass li.ecxMsoAcetate, .ExternalClass div.ecxMsoAcetate {
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
}
.ExternalClass span.ecxEmailStyle17 {
font-family:"Calibri","sans-serif";
color:windowtext;
}
.ExternalClass span.ecxBalloonTextChar {
font-family:"Tahoma","sans-serif";
}
.ExternalClass .ecxMsoChpDefault {
font-family:"Calibri","sans-serif";
}
.ExternalClass div.ecxWordSection1 {
}
--></style><div class="ecxWordSection1"><p class="ecxMsoNormal">Can anyone see anything wrong with this… this is in the index.htm page that loads my RLO. I’m loading a swf file in the RLO that calls the ‘flashInititialized’ function below. The function runs, because if I remove the comments around the alert(‘xxxxx’) that will display.</p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"><script type="text/javascript" language="JavaScript"></p><p class="ecxMsoNormal">myRLO = new rloObject('975','731','ron_acoustic.rlo');</p><p class="ecxMsoNormal"></script></p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"> <script type="text/javascript"></p><p class="ecxMsoNormal"> // called by our action script after initialization</p><p class="ecxMsoNormal"> function flashInitialized()</p><p class="ecxMsoNormal"> { </p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"> //alert('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); THIS RUNS WHEN COMMENT REMOVED</p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"> var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;</p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"> // get flash object</p><p class="ecxMsoNormal"> //flash = isInternetExplorer ? document.all.myRLO.newMenu : document.myRLO.newMenu;</p><p class="ecxMsoNormal"> flash = isInternetExplorer ? document.all.myRLO.newMenu : document.myRLO.newMenu; </p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"><span style="background:yellow;">WHAT SYNTAX SHOULD I BE USING HERE TO CALL A FUNCTION IN THE SWF LOADED BY THE RLO? NONE OF THESE WILL RUN….</span></p><p class="ecxMsoNormal"> // call action script function</p><p class="ecxMsoNormal"> <span style="background:yellow;">flash.setText('Hello from javascript via xerte RLO');</span></p><p class="ecxMsoNormal"><span style="background:yellow;"> //myRLO.newMenu.setText('Hello from javascript via xerte RLO');</span></p><p class="ecxMsoNormal"><span style="background:yellow;"> //_level0.engine.newMenu.setText('Hello from javascript via xerte RLO');</span></p><p class="ecxMsoNormal"> }</p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"> </script></p></div>
<br>This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<BR>This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.<BR>
<br><br>_______________________________________________
Xerte mailing list
Xerte@lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte</div> </div></body>
</html>