flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: FlexJS and ExternalInterface
Date Mon, 23 Nov 2015 16:48:42 GMT
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.sd@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:aharui@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.sd@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
>
>

Mime
View raw message