A word of caution about using getUrl in flash. If there is any way getUrl
can be called before your page has finished loading, it may prevent your
page from loading fully in IE.

This happened on a large web site I worked on a year ago. We never saw the
problem in development because we were sitting on top of the dev servers and
everything loaded quickly. But in production, the servers were across the
country and the latency delayed loading just enough for a quick-on-the-draw
SWF to call getUrl ... and anything after that call would cease to load in
IE. The result looked like an intermittent/random web server issue (some css
and/or images not loading). But it was the getUrl call. IE interpreted that
call as if the user had clicked on a link that took them to another page...
regardless of the fact that it was making a call to JavaScript that revealed
a DHTML layer.

I understand there are a few other alternatives to getUrl... but I'm not
familiar with them. On the example project above we ended up with a solution
that removed the SWF -> JavaScript call altogether.

If you're building a web application that requires significant SWF <->
JavaScript communication you may consider building an Adobe AIR application.
They've built AIR so that SWF and JS can talk effortlessly.

Cheers,
Brian.

P.S. We now always use latency/bandwidth throttling during development to
expose such issues... look at the application called "Charles" ... it's a
local web proxy that can also be used to throttle your connection...
http://www.xk72.com/charles/


On 10/5/07, njsuperfreak <[EMAIL PROTECTED]> wrote:
>
>
> Sweet! Good Find Brett, and thanks Sam! I think I am definitely going
> to experiment with this. looks interesting...
>
> On Oct 4, 8:19 pm, Brett <[EMAIL PROTECTED]> wrote:
> > Interesting, I googled up and found an example of this:
> http://www.quirksmode.org/js/flash_call.html
> >
> > Not jQuery as such in the demo, but any function you write can refer
> > to jQuery.
> >
> > On Oct 5, 8:10 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> >
> > > your flash would need to be wmode=transparent
> >
> > > and you'd need to call a javascript function from within flash that in
> turn
> > > calls the grey box function
> >
> > > since jquery applies the onclick event to all anchors with a class of
> > > greybox you'll need simluar code inside you function that you call
> from
> > > flash.
> >
> > > getURL('javascript:callGreyboxFromFlash()');
> >
> > > - S
> >
> > > On 04/10/2007, njsuperfreak <[EMAIL PROTECTED]> wrote:
> >
> > > > Can Flash communicate with jQuery? I would like to use flash to
> > > > interact with jQuery like opening up a dialogbox using the
> greybox.js
> > > > plugin. How would I go about doing that any ideas?
> >
> > > > The code is activated by the class="greybox"
>
>

Reply via email to