Getting Started with Flash Remoting and Java within ColdFusion MX
This is an addendum to the following article Getting Started with ColdFusion MX and Flash Remoting article that uses a Java class deployed in ColdFusion MX to create a service that can be called from Flash via Flash Remoting.
Note, currently you must have ColdFusion MX installed in order to use Flash Remoting. However, we will be releasing separate versions for Java servers very soon.
This article assumes that you are familiar with Java and Java concepts.
- Open the above article in your web browser.
- Download and install the ColdFusion MX preview release.
- Download and install the Flash Remoting Addons for Flash MX.
- Create HelloWorld.java in the com.macromedia.test package.
HelloWorld.java should contain the following code:
package com.macromedia.test;
public class HelloWorld
{
public String sayHello()
{
return "Hello World";
}
}
compile this into the \runtime\servers\default directory.
There are no changes required in the Flash code. Open the example file in Flash MX and test your movie.
Note : If you have done any of the other versions of the tutorials, you need to rename the wwwroot\com\macromedia\test directory (to ensure that the Java class is called and not the code in the folder).
Of course, this is a really simple example. Play around with passing more complex data such as Arrays, HashMaps and ResultSets. Ill post more information later on how to pass more complex datatypes.