Re: [Flashcoders] Re: Asynchronous ExternalInterface Calls From Javascript, possible?

2007-06-21 Thread Seth Green

yeah, that may very well be it.

jtgxbass wrote:

I suspect the first call delay is to do with flash getting a wsdl file (if
its a SOAP service). Once it has the wsdl, it needs not d/load it again.

On 6/21/07, elibol [EMAIL PROTECTED] wrote:


Hmm, I think it checks for the crossdomain.xml file when the webservice
attempts to load/connect. Simple access to a file on a remote (sub)domain
is
not allowed.

On 6/20/07, jason vancleave [EMAIL PROTECTED] wrote:

 Seth Green seth.m.green at gmail.com writes:

 
  It turns out that the asynchronous web service call actually takes
  some extra time (like 100ms) the FIRST time you use that web service
  method.

 Not to confuse the matters worse but I wonder if that has something to
do
 with
 it looking for the a crossdomain.xml file.

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Asynchronous ExternalInterface Calls From Javascript, possible?

2007-06-20 Thread Seth Green
I'm not calling a JS function from flash until the end of this process. 
It is the beginning of this process that I want to be made asynchronous. 
 In the beginning I am calling a flash function from JS. That is the 
piece I am trying to get to be asynchronous.


jtgxbass wrote:

You could make use of ExternalInterface.addCallback. Therefore the JS
function you call with ExternalInterface.call starts some process off then
returns straight away. When your process is done it calls your registered
flash callback. Therefore you end up with asynchronous.

All said and done, why not call the webservice straight from flash?

On 6/19/07, Seth Green [EMAIL PROTECTED] wrote:


I have a web app that uses a flash movie as a proxy to a web service.
Therefore, I have javascript calling flash methods that in turn make
requests to a web service and then route the response back to javascript.

I don't need my javascript functions to wait on this calls, but
ExternalInterface is inherently synchronous. And to my surprise I have
found that a flash method which does nothing but make a web service
request can take 100ms or more. This is unacceptably slow, but
especially so since my javascript code has to hang while the flash
method does its business.

Does anyone have any experience with this issue, or can provide a
workaround or hint as to how I might make these calls asynchronous?

thanks in advance.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Re: Asynchronous ExternalInterface Calls From Javascript, possible?

2007-06-20 Thread Seth Green
I can try that, but since flash isn't multithreaded, I'm not sure that 
would work. You mean if I had in AS


function calledFromJS():Void {
 doSomething();
 return;
}

right? I believe the call to that function would still take as long as 
doSomething() takes. Unless I misunderstood...


jason vancleave wrote:


Maybe I am misunderstanding something bu I would think you could set up a
methodology where JS makes a call to Flash, Flash returns something immediately
to JS, then does its stuff with the web service and calls back to JS again when
its done.

Another option is instead of using ExternalInterface you can use the
Flash/JavaScript Gateway

One thing I have went through is rapid calls between Javascript and Flash have
dropped calls. I believe the kit below has a queuing functionality built into 
it.

The one I have used is 


http://blog.deconcept.com/code/intkit/

because it works well with SWFObject


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Asynchronous ExternalInterface Calls From Javascript, possible?

2007-06-20 Thread Seth Green
It turns out that the asynchronous web service call actually takes 
some extra time (like 100ms) the FIRST time you use that web service 
method. Subsequent calls to that method only take 1ms.


So, this first time you call this function from JS, JS is blocked for 
about 100ms


//flash
ExternalInterface.addCallback(service_GetEmails, this, getEmails);
function getEmails():Void {
_pendingCall = service.getEmails(emailIds);
_pendingCall.onFault = function(fault){service_onFault(fault);}
_pendingCall.onResult = function(result){toJS(result);}
}

//JS
myMovie.service_GetEmails();

Subsequent calls are super fast. Not sure why this is. Must have 
something to do with some overhead incurred during the first call. I'd 
be interested to know the answer.


I didn't realize it was only on the first call that so much time was 
taken. I can actually live with that. Otheriwse, the setInterval and/or 
setTimeout suggestion would have done the trick.


Thanks




elibol wrote:

Aren't web service calls asynchronous, or am I missing something? I mean,
you typically have to set up a result function to handle the web service
response. Calling the service should not hold the function.

In any case, I'd expect you'd have to handle this like follows:

//javascript
function call(){
swfObject.call();
}

//flash
function call(){
}

function callBack(){
getURL(javascript:callBack();)
}

//javascript
function callBack(){
//this would be called when the service response is recieved.
}

On 6/20/07, Steven Sacks [EMAIL PROTECTED] wrote:


setInterval is a handy way to break scope.

Have the AS method called by JS set an interval for let's say 10ms, and
then have the method assigned to the interval take care of business.
Javascript will be free and Flash will keep on going.

-Steven


Seth Green wrote:
 I'm not calling a JS function from flash until the end of this process.
 It is the beginning of this process that I want to be made 
asynchronous.

  In the beginning I am calling a flash function from JS. That is the
 piece I am trying to get to be asynchronous.

 jtgxbass wrote:
 You could make use of ExternalInterface.addCallback. Therefore the JS
 function you call with ExternalInterface.call starts some process off
 then
 returns straight away. When your process is done it calls your
registered
 flash callback. Therefore you end up with asynchronous.

 All said and done, why not call the webservice straight from flash?

 On 6/19/07, Seth Green [EMAIL PROTECTED] wrote:

 I have a web app that uses a flash movie as a proxy to a web service.
 Therefore, I have javascript calling flash methods that in turn make
 requests to a web service and then route the response back to
 javascript.

 I don't need my javascript functions to wait on this calls, but
 ExternalInterface is inherently synchronous. And to my surprise I 
have

 found that a flash method which does nothing but make a web service
 request can take 100ms or more. This is unacceptably slow, but
 especially so since my javascript code has to hang while the flash
 method does its business.

 Does anyone have any experience with this issue, or can provide a
 workaround or hint as to how I might make these calls asynchronous?

 thanks in advance.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Re: [Flashcoders] Flash Development on PC vs Mac

2007-06-20 Thread Seth Green
I'd say your choice of Mac vs. PC should go well beyond which is better 
for flash development considering there are major differences between 
the two.


I'd like to challenge the rest of the people on the list not to get into 
a PC vs Mac fanboy debate and keep this particular discussion to flash 
development on the two OSs.


My only anecdotal evidence is that my wife works for a prominent 
interactive agency that does a ton of flash development. their entire 
flash team uses Macs.




Jim Robson wrote:

Questions for those of you who have done Flash development on both
platforms:

What are the pros and cons of Flash development on Mac vs PC? Which
platform would you recommend?

My laptop is in need of replacement, and my employer generally gives
us a choice of IBM (lenovo) or Mac.



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flash Development on PC vs Mac

2007-06-20 Thread Seth Green
Another question is what environment are your apps served from. For 
instance, all of our servers are some flavor of unix, running apache, 
etc. etc.


Because of this, using a Mac has helped in that I can exactly replicate 
the server environment on my machine. Anything that is installed on the 
server can easily be installed on my machine (because it is unix-based).


If your apps are hosted off windows boxes, then you should consider that 
as well.




Jim Robson wrote:

Questions for those of you who have done Flash development on both
platforms:

What are the pros and cons of Flash development on Mac vs PC? Which
platform would you recommend?

My laptop is in need of replacement, and my employer generally gives
us a choice of IBM (lenovo) or Mac.



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Asynchronous ExternalInterface Calls From Javascript, possible?

2007-06-19 Thread Seth Green
I have a web app that uses a flash movie as a proxy to a web service. 
Therefore, I have javascript calling flash methods that in turn make 
requests to a web service and then route the response back to javascript.


I don't need my javascript functions to wait on this calls, but 
ExternalInterface is inherently synchronous. And to my surprise I have 
found that a flash method which does nothing but make a web service 
request can take 100ms or more. This is unacceptably slow, but 
especially so since my javascript code has to hang while the flash 
method does its business.


Does anyone have any experience with this issue, or can provide a 
workaround or hint as to how I might make these calls asynchronous?


thanks in advance.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com