We have a service communicating back and forth in realtime over SignalR. We have a HTML5 frontend, but I would like to try to make a Flash/Actionscript frontend with AIR that I can compile to a native iOS/Android app. Is there a library available to communicate with the SignalR server hub?
Share
There is no Flash/ActionScript proxy generator at this time. It’s fairly trivial to create given that ActionScript is basically just JavaScript anyway. All you would need to do is create a custom
IJavaScriptProxyGeneratorimplementation which emits a proxy that best leverages and exposes itself to the ActionScript runtime.You can clone the
DefaultJavaScriptProxyGeneratoras a jumping off point (call itActionScriptProxyGenerator) and then just replace the portions of the implementation that emit jQuery based patterns/impl to emit ActionScript based patterns/impl instead.Then all you would do is hit the Hub endpoint to download the script into Flash (or you can save it and build right into the Flash component statically) and then you’re off and running.
If you end up doing this I’m sure the SignalR project and other Flash devs would love if you contributed it back, so please be sure to send a pull request if you do!