1 Replies - 952 Views - Last Post: 27 May 2017 - 12:15 PM

#1 carlos3442   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-May 17

AS3 ExternalInterface API on a different layer than 0

Posted 27 May 2017 - 07:18 AM

Hello

I am encountering problem trying to interface with an flash that is not on layer 0.
I load my flash, that consists of:
ExternalInterface.addCallback("testCallback",function (text : String) : String
{
    return "returned" + text;
});


Now when I have the flash loaded in my axshockwaveflash container like:
Flash.LoadMovie(0, "C:/TestCallBacks.swf")

then the following External Interface call works:
<invoke name="testCallback" returntype="xml"><arguments><string>hello</string></arguments></invoke>
MsgBox(Flash.CallFunction("<invoke name=""testCallback"" returntype=""xml""><arguments><string>" + "hello" + "</string></arguments></invoke>"))

This returns "returned hello" as expected, but when I have the LoadMovie to layer 1 or anything besides 0, then it stops working, I have tried renaming the invoke name to "_level1.testCallback", any ideas?

Is This A Good Question/Topic? 0
  • +

Replies To: AS3 ExternalInterface API on a different layer than 0

#2 carlos3442   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-May 17

Re: AS3 ExternalInterface API on a different layer than 0

Posted 27 May 2017 - 12:15 PM

tested with FScommand and same thing happens, it is not registered unless the layer is at level 0.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1