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
Contributor
Posts: 19
Registered: ‎06-08-2011
My Device: Playbook

ExternalInterface.call does not work on Playbook

Hi,

 

I have created swf file which uses

ExternalInterface.call("window.alert", "test");

but it does not seem to work on playbook.

 

I have also seen if the ExternalInterface is available on playbook and it gives me a true value, which means it is available on playbook.

////////////////////////////////////////////////

var isAvailable:Boolean = ExternalInterface.available;
var availTxt:TextField = new TextField();
availTxt.text = "Checking---"+isAvailable.toString();
addChild(availTxt);

//true

////////////////////////////////////////////////////////

Also added  --------flash.system.Security.allowDomain("*");----in my flash file and 

<param name="allowScriptAccess" value="always" />  for my html file.

 

I need this function to send a value from flash to html using javascript.

Is there anything else that I need to do so that my script works.

 

Thank You.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: ExternalInterface.call does not work on Playbook

ExternalInterface is only for web based flash applications. This is the Adobe AIR forum. ExternalInterface is not supported by AIR applications.
Contributor
Posts: 19
Registered: ‎06-08-2011
My Device: Playbook

Re: ExternalInterface.call does not work on Playbook

Hi,

 

I am using the webworks packager to package the files. I have embedded the swf file in the html and the swf file calls the javascript ' window.alert("test"); 

this works for me on desktop. 

Also  window.alert("test");  when called using html works.

Through flash it is not working

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: ExternalInterface.call does not work on Playbook

This is the Adobe AIR forum. The Webworks forum might be able to help you better.
Contributor
Posts: 19
Registered: ‎06-08-2011
My Device: Playbook

Re: ExternalInterface.call does not work on Playbook

Posted in Webworks Forum

 

Thanks

dfk
New Contributor
Posts: 2
Registered: ‎07-06-2011
My Device: none

Re: ExternalInterface.call does not work on Playbook

I too am interested in communicating between JavaScript and ActionScript.  Does the following not work on the BlackBerry platform?

 

From the ActionScript® 3.0 Reference for the Adobe® Flash® Platform:

 

Note for AIR applications: In Adobe AIR, the ExternalInterface class can be used to communicate between JavaScript in an HTML page loaded in the HTMLLoader control and ActionScript in SWF content embedded in that HTML page.

 

 

Contributor
Posts: 19
Registered: ‎06-08-2011
My Device: Playbook

Re: ExternalInterface.call does not work on Playbook

If you open the html file in a browser uploaded on a server, the external interface works, but not when u open the html file saved on your playbook.

dfk
New Contributor
Posts: 2
Registered: ‎07-06-2011
My Device: none

Re: ExternalInterface.call does not work on Playbook

Thanks