Question

Officially, BlazeDs can only be used "with Flex and AIR". This comment is puzzling in itself since Flex is a set of Actionscript development tools, while AIR is a "mode" in which Flash can operate.

Ultimately, I am starting a new project and I want to use BlazeDS for a Flash CS5.5 (or CS6)-based project. Is this possible? Has anyone used this combination in the past?

Was it helpful?

Solution

If you actually read the article you linked to, you'll soon find that it is absolutely okay to use BlazeDS with any technology that can communicate with a web socket - its message format (AMF3) is an open standard.

So yes, it can be used with Flash (or rather, pure ActionScript), but it is a little less convenient than with MXML, where everything is set up by the framework, because it takes more "under the hood" configuration to be able to run all the necessary parts for remoting. And you will still need the Flex SDK, of course - there's no getting around that.

Once you have the Flex SDK set up with your Flash IDE, you have to manually initialize the Flex remoting classes needed before you can access a BlazeDS service. There is a sample class that has all the required calls and some additional information in this blog post.

I have also written an extensive tutorial about getting RemoteObject wired up and working, as well as setting up a simple "Hello World" web service on my blog. The article series I wrote is intended for use with FDT and RobotLegs 2, but at least the first part (setting up a Java WAR project to deploy as web service) should be helpful to you, nonetheless.

Finally, I would recommend you rethink using Flash as your primary IDE - in my experience, it... well, frankly, it sucks (pardon my French) for anything but animations and setting up asset libraries. If you don't want to pay for a better IDE, you should consider using FlashDevelop (unless you're on a Mac - OS X is not supported). Or maybe give FDT a try - it is much, much more convenient for coding, even if you don't buy the Max license.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top