Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I use ExternalInterface with Microsoft Edge

New Here ,
Dec 19, 2016 Dec 19, 2016

Help.

TOPICS
ActionScript
828
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2016 Dec 19, 2016
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2016 Dec 19, 2016

To answer your other post different question:

ExternalInterface working is just down to Flash Player, and whether you made the SWF with Animate or Flash Pro won't make a difference.

What goes wrong when trying with the Edge browser?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 19, 2016 Dec 19, 2016

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>

  <script>
   
function Test() {
  alert("TEST");
 
}

</script>

</head>

<body>


<object type="application/x-shockwave-flash" data="test.swf" width="550" height="400" name="movie_name" id="movie_name" align="middle">    <param name="movie" value="test.swf"/>  </object>


</script>
</body>
</html>

And the AS3.0

ExternalInterface.call("Test");

^

Doesn't work on Edge.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2016 Dec 19, 2016

i see some problems with your embedding code, but even after fixing i still see a problem with edge.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 20, 2016 Dec 20, 2016

bumppp

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 16, 2017 Mar 16, 2017
LATEST

I am also seeing a similar issue in Edge. FF, Chrome, and IE are all behaving.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines