[Flashcoders] Flash + jQuery

2011-11-04 Thread Ben Sand
What's the best way to get Flash and jQuery communicating?

* I'll need flash to access a rails server via jQuery
* Also be doing a lot of javascript work on the client and need
updates to flow through to flash.

I'd prefer a solution that was flexible and robust, rather than quick
and easy. There will need to be a lot of communication later on.

Thanks,

Ben
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash + jQuery

2011-11-04 Thread Nathan Mynarcik
Why not use ExternalInterface.call('functionName')?

ExternalInterface
Documentationhttp://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html?filter_flash=cs5filter_flashplayer=10.2filter_air=2.6
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash + jQuery

2011-11-04 Thread Ben Sand
That'll do the trick, I was wondering whether there was a framework or
paradigm for dealing with this as it things scale.

The app we're building is quite large and we need to keep it maintainable.

We work on RobotLegs, so I suppose some of this would fit into the
services section, but other parts would fit in to the views, so it
feels like it could get a bit out of hand.

It's a bit simpler when some the divide is server side, but when
you've got two client side systems running side by side the
conventions I've seen seem to break down.

On 4 November 2011 17:17, Nathan Mynarcik nat...@mynarcik.com wrote:
 Why not use ExternalInterface.call('functionName')?

 ExternalInterface
 Documentationhttp://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html?filter_flash=cs5filter_flashplayer=10.2filter_air=2.6
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash + jQuery

2011-11-04 Thread Henrik Andersson
You sure that you need javascript to access the server? Flash is
perfectly capable of making http requests on it's own.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash + jQuery

2011-11-04 Thread Kevin Newman
You could look into using a Proxy class inside of Flash, to wrap method 
calls to ExternalInterface calls.


http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Proxy.html

It's easy to set up, and actually is pretty common for remote procedure 
calls.


Kevin N.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash + jQuery

2011-11-04 Thread Kevin Newman
You could look into using a Proxy class inside of Flash, to wrap method 
calls to ExternalInterface calls.


http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Proxy.html

It's easy to set up, and actually is pretty common for remote procedure 
calls.


Kevin N.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders