Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
Posts: 5
Registered: ‎05-18-2011
My Device: Playbook
My Carrier: WLAN

ExternalInterface.call

Hi, flash.external.ExternalInterface call doesn't seem to work?! Im getting Error #2060. Any hints? Regards, Mikas
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: ExternalInterface.call

Have you checked what value you see for flash.external.ExternalInterface.available?


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
Posts: 5
Registered: ‎05-18-2011
My Device: Playbook
My Carrier: WLAN

Re: ExternalInterface.call

ExternalInterface.available  returns true, so im puzzled.

Contributor
Posts: 28
Registered: ‎02-18-2011
My Device: Not Specified

Re: ExternalInterface.call

 


Mikas wrote:
Hi, flash.external.ExternalInterface call doesn't seem to work?! Im getting Error #2060. Any hints? Regards, Mikas

 

#2060Security sandbox violation: ExternalInterface caller %1 cannot access %2.

 

You probably need to use allowDomain("*") or something similar to setup the correct permissions. Have a look at the actionscript documentation for the functions you are using. They explain it more there.

 

I'm curious as to what you're trying to do, such that you need ExternalInterface for an AIR app? I've only ever used it to talk between a swf and an html page.

New Contributor
Posts: 5
Registered: ‎05-18-2011
My Device: Playbook
My Carrier: WLAN

Re: ExternalInterface.call

Where should I add allowDomain("*") ?

 

Basically Im trying to run the last example from this page (ExternalInterfaceExample.as):

 

http://help.adobe.com/de_DE/AS3LCR/Flash_10.0/flash/external/ExternalInterface.html

Contributor
Posts: 28
Registered: ‎02-18-2011
My Device: Not Specified

Re: ExternalInterface.call

Response to your question below, but you're asking in the wrong place. This is a forum for Adobe AIR development on the PlayBook. You need a flash player forum.

 

Anyway, the instructions are in the link you sent:

 

  1. Legen Sie in der HTML-Seite im object-Tag der SWF-Datei den folgenden Parameter fest:

    <param name="allowScriptAccess" value="always" />

  2. Fügen Sie in der SWF-Datei den folgenden ActionScript-Code ein:

    flash.system.Security.allowDomain(sourceDomain)

 

For no. 2 use "*" instead of sourceDomain to specify a wildcard which will allow any domain.