Hey alex.

I love flexJS so far. 

Make sense.. I am starting to check all  the examples. 

The question is mostly how the pieces communicate. I need the JS  events sent 
to my code  and my code needs to call functions in the js. 

In short words Zoiper send there is a call incoming I should send to my code 
and my code can ask Zoiper to answer the call.  Pretty much 

Doing this without ExternalInterface maybe tricky.. there is any way the JS 
section can call something from inside the class that's created? And vice versa 

I think can be doing using createjs/jquery wrapper will let you know how my 
adventure goes

<!-- the CreateJS text button component -->
<createjs:TextButton label="CreateJS" /> so I can get the events this baby have 
right?

So creating a class in jquery and calling the jquery wrapper I can call all the 
methods in my class and receive all the events correct?

Interesting :) 
I am using falconJX 0.0.2 right now and I have being able to generate simple 
applications. going to try to upgrade to 0.0.5 this week. 

--
Saul
-----Original Message-----
From: Alex Harui [mailto:aha...@adobe.com] 
Sent: Monday, November 23, 2015 9:49 AM
To: users@flex.apache.org
Subject: Re: FlexJS and ExternalInterface

Hi Saul,

So in the FlexJS way of thinking, instead of implementing an JS equivalent for 
ExternalInterface (which is still a reasonable thing to do), I would recommend 
the following:

Create a Zoiper class in AS.  It would use ExternalInterface to call the below 
code in the wrapper.
Create a Zoiper class in JS.  It would not use ExternalInterface since it 
doesn't need to, it would just call the Zoiper code directly.

That way, your JS version will have the most optimal code paths.  Does that 
make sense?

BTW, the FalconJX compiler has been upgraded to the point where we are working 
on changing all of our JS code back to AS and using conditional compilation to 
have platform-specific JS generated from AS.  If you want to find out more 
about that, ask on the dev@ list.  We're finding that writing AS to output JS 
is more efficient because the type-checking catches errors.

-Alex

On 11/23/15, 7:11 AM, "Saul Diaz" <cripito...@gmail.com> wrote:

>For example this function ,
>
>                       <!-- The function "OnZoiperReady" is the entry point 
> for Zoiper Web 
>usage. It is called by Zoiper Web when it is ready for use. It provides 
>a reference to its "Phone" object which we assign to the "Zoiper" variable.
>We use it to make the initial setup -->
>                       function OnZoiperReady(phone)
>                       {
>                               Zoiper = phone;
>                               Zoiper.AllowMultipleInstances();
>                               
>                               var Config = Zoiper.GetConfig();
>                               Config.SetSIPIAXPorts("4566", "5060");
>                               Config.PopupMenuOnIncomingCall = "false";
>                               Config.RingWhenTalking = "false";
>                               Config.AutoAnswer = true;
>                               Config.UseEchoCancelation = true;
>                               Config.RecordCalls = false;
>                               Config.RingWhenTalking = false;
>                               
>                <!-- Force the browser to set flex app with focus -->
>                var obj = swfobject.getObjectById("WebAgent");
>
>                if (obj) {
>                       obj.ZoiperReady();
>                }
>                       }
>
>
>It sends to the swf a notification when the activeX (phone) was loaded
>
>Regards
>Saul
>-----Original Message-----
>From: Alex Harui [mailto:aha...@adobe.com]
>Sent: Sunday, November 22, 2015 9:51 PM
>To: users@flex.apache.org
>Subject: Re: FlexJS and ExternalInterface
>
>
>
>On 11/22/15, 4:27 PM, "Saul Diaz" <cripito...@gmail.com> wrote:
>
>>Hi
>>
>> 
>>
>>Not sure is the right place to ask about this but will make my life 
>>super easy.
>>
>> 
>>
>>FlexJS have anything like ExternalInterface that allows to integrate 
>>another js SDK?
>
>We don't have such a thing now.  Simple versions might be easy to create.
>Can you provide another level of detail on what you are trying to do?
>There may be another/better way to do it in FlexJS.  For example, we 
>have wrapped Jquery and CreateJS components so you can work with them 
>more directly than you can with ExternalInterface.
>
>Thanks,
>
>-Alex
>
>


Reply via email to