[Xerte] Re: desktop xerte js syntax to call swf function

Dave Burnett d_b_burnett at hotmail.com
Fri Jan 17 00:03:38 GMT 2014

Ron, I think it's a one way street.Julian wrapped the ExternalInterface.call method in a wrapper that allows Xerte to call outward (hence your initialization alert works).But there is no way set up to call inward (JS to AS).

From: knowledgeware at kccsoft.com
To: xerte at lists.nottingham.ac.uk
Date: Thu, 16 Jan 2014 16:00:25 -0800
Subject: [Xerte] desktop xerte js syntax to call swf function

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. <script type="text/javascript" language="JavaScript">myRLO = new rloObject('975','731','ron_acoustic.rlo');</script>      <script type="text/javascript">    // called by our action script after initialization    function flashInitialized()    {                  //alert('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');     THIS RUNS WHEN COMMENT REMOVED                      var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;       // get flash object      //flash = isInternetExplorer ? document.all.myRLO.newMenu : document.myRLO.newMenu;                flash = isInternetExplorer ? document.all.myRLO.newMenu : document.myRLO.newMenu;   WHAT SYNTAX SHOULD I BE USING HERE TO CALL A FUNCTION IN THE SWF LOADED BY THE RLO? NONE OF THESE WILL RUN….      // call action script function      flash.setText('Hello from javascript via xerte RLO');      //myRLO.newMenu.setText('Hello from javascript via xerte RLO');      //_level0.engine.newMenu.setText('Hello from javascript via xerte RLO');    }     </script>

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.
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.

Xerte mailing list
Xerte at lists.nottingham.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20140116/6091d953/attachment.html>

More information about the Xerte mailing list