I am trying to integrate flash and coldfusion. I have been following a tutorial in “Macromedia Coldfusion MX 7” that has given me a good start. However, every time I try to publish the flash file, I come up with the error “Classes may only be defined in external ActionScript 2.0 class scripts.” I googled it up and found what others have found to be the problem… (http://www.adobe.com/devnet/flash/articles/migrate_flashmx2004_02.html) that [URL=“http://www.adobe.com/devnet/flash/articles/migrate_flashmx2004_02.html”][COLOR=#000000]The name of an AS class file must match the name of the class it contains[/COLOR]. Well, I think it does…
Inside the NetServices.as file that it is referencing, the line of code that flash has a problem with is: “class mx.remoting.NetServices extends Object”
Inside the flash file…
#include “…/…/…/…/coldfusion/NetServices.as” //this is where I have put the file
// Application initialization
if (inited == null) {
inited = true; // to do this only once
NetServices.setDefaultGatewayUrl("<A href=“http://localhost:8500/flashservices/gateway”) //">**http://localhost:8500/flashservices/gateway") **// set the default gateway URL
gateway_conn = NetServices.createGatewayConnection(); // connect to the gateway
myService = gateway_conn.getService(“coldfusion”, this); // get a reference to a service // In this case, the “service” is the /ows/23 directory in web server root
}
Anyways, in both cases, I am using “NetServices” so I don’t see what the problem could be.
Any help with this would be greatly appreciated and if you need more clarification on what I am trying to accomplish, please feel free to ask.
Thanks again!