flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Externalnterface
Date Sun, 06 Sep 2015 04:39:19 GMT
JavaScript doesn’t have a concept of an ArrayCollection, but you can
certainly encode an Array and pass it over to JS and have it become an
Array over there.

-Alex

On 9/5/15, 6:22 AM, "mark goldin" <markzolotoy@gmail.com> wrote:

>Can I send an araycollection to javascript?
>
>On Thu, Aug 27, 2015 at 2:25 PM <KSands@loftware.com> wrote:
>
>> So I believe this is the original scenario
>>
>> 1. You have a Flex application on web page, index.html
>> 2. You launch a new window from the Flex application using,
>> ExternalInterface.call("open", "testcase.html", "_blank");
>>
>> Your question is:
>> Is it possible to execute Javascript from testcase.html that will call
>> back to the Flex application on the index.html page?
>>
>> I think you can do it by leveraging window.opener in javascript
>>
>> Testcase.html
>> <script>
>>         function callBack(){
>>                 if(window.opener != null){
>>                         // backtoMyOriginalFunc is the name of a
>> javascript function in Index.html
>>                         window.opener.backToMyOriginalFunc()
>>                 }else{
>>                         alert("Unable to notify original window.");
>>                 }
>>         }
>> </script>
>>
>> Index.html
>> <script>
>>         function backToMyOriginalFunc (){
>>                 // Find the flex application in the  page
>>                         var flexApp = FABridge.flash.root();
>>                 // Call the function defined in the Flex application
>>                         flexApp.testCallBack();
>>         }
>> </script>
>>
>> Keegan Sands
>> Technical Lead
>> T: +1-603-570-4633
>> www.loftware.com
>>
>> -----Original Message-----
>> From: pkumar.flex [mailto:prashakumar@gmail.com]
>> Sent: Thursday, August 27, 2015 2:05 PM
>> To: users@flex.apache.org
>> Subject: Re: Externalnterface
>>
>> yes you can call a function from JavaScript to Flex. using
>> ExternalInterface.addCallback("JAVAScript Func", FlexFunction);
>>
>> you only need to add this line on creationcomplate of any component.
>>
>> On Thu, Aug 27, 2015 at 11:30 PM, mark goldin [via Apache Flex Users] <
>> ml-node+s2333346n11070h55@n4.nabble.com> wrote:
>>
>> > I am opening a new browser window using the following command:
>> > ExternalInterface.call("open", "testcase.html", "_blank");
>> >
>> > Is it possible to call a function in Flex from testcase.html?
>> >
>> > Thanks
>> >
>> >
>> > ------------------------------
>> > If you reply to this email, your message will be added to the
>> > discussion
>> > below:
>> >
>> > http://apache-flex-users.2333346.n4.nabble.com/Externalnterface-tp1107
>> > 0.html To unsubscribe from Apache Flex Users, click here
>> > <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.j
>> > tp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tf
>> > DF8LTU0MTcyMzE2NA==>
>> > .
>> > NAML
>> > <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.j
>> > tp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabbl
>> > e.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamesp
>> > ace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscrib
>> > ers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_in
>> > stant_email%21nabble%3Aemail.naml>
>> >
>>
>>
>>
>> --
>> *Regards,*
>> Prashant Kumar* | *Mob.: +91 8408811225
>>
>>
>>
>>
>> --
>> View this message in context:
>> 
>>http://apache-flex-users.2333346.n4.nabble.com/Externalnterface-tp11070p1
>>1071.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>>

Mime
View raw message