I am trying to use ExternalInterface with my AS3.0 app to pass data back to my HTML page upon the completion of a video. I manage to get this working on Chrome, but with Microsoft Edge it just doesn't happen.
Im trying to write a webpage that integrates with a flash file I made. I managed to get it working with chrome, but with Edge the feature doesn't work. The flash file uses a method to call a JavaScript function that is supposed to change the style of two divs, but it just doesn't work on edge..
<script> function JsTestFunction( myFlashValue ) { document.getElementById("flashContent").style.display = "none"; document.getElementById("fiveContent").style.display = "block"; } </script> ---------------------------------------------------------------------------- This part is the flash part, it works with chrome ---------------------------------------------------------------------------- import flash.external.ExternalInterface; // by querying the LoaderInfo object, set the value of paramObj to the // to the value of the variable named myVariable passed from FlashVArs in the HTML var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters.myVariable; ExternalInterface.call('alert','hello world'); // set the text of the text instance named text1. Use the toString() method var myVideo:Video = new Video(); addChild(myVideo); var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); myVideo.attachNetStream(ns); ns.addEventListener(NetStatusEvent.NET_STATUS, doNetStatus); ns.play(paramObj.toString()); function doNetStatus(e:NetStatusEvent):void { switch (e.info.code) { case "NetStream.Play.Stop" ://Playback has stopped. ExternalInterface.call('JsTestFunction','The_String'); case "NetStream.Buffer.Empty" : ExternalInterface.call('JsTestFunction','The_String'); } }
Help.
To make things simple, let's start with getting an alert("TEST"); working on Edge, I have that working on chrome by doing this...