5

Getting Started with Flash Remoting and Java within ColdFusion MX

 3 years ago
source link: http://www.mikechambers.com/blog/2002/05/05/getting-started-with-flash-remoting-and-java-within-coldfusion-mx/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Getting Started with Flash Remoting and Java within ColdFusion MX

Sunday, May 5, 2002

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.

  1. Open the above article in your web browser.
  2. Download and install the ColdFusion MX preview release.
  3. Download and install the Flash Remoting Addons for Flash MX.
  4. 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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK