mallen
09-12-2007, 12:02 AM
I am using Flash CS3 and Actionscript 2. So I have run into a problem getting it to work. But I have read some posts online how you need to copy the .as file and install the components from flash 8 to get it to work. But they say it can work.
I want to use ColdFusion with Flash. I have read about Flash Remoting but do not want to use the DataGrid. I want to query my database and display the recordset data in Flash.
I was able to get the remoting components and classes installed. Not sure if I put them in the right place. Went to the class path in the publish settings. Now it finds the NetServices.as file. But here is the error I am getting with source below it.
Classes may only be defined in external ActionScript 2.0 class scripts.
class mx.remoting.NetServices extends Object
The problem is it is written in action script 1. It won't let me change the class path in the publish settings. if I change it to AS2 it lets me change the path but I get this error because the context is wrong. If you have the CF WACK book it is chapter 26 Flash remoting.
Now i tried a new approach. Instead of this:
#include "NetServices.as"
#include "DataGlue.as"
I tried this:
import mx.remoting.NetService
import mx.remoting.debug.NetDebug
Now I get the following error.
The class 'mx.remoting.NetServices' needs to be defined in a file whose relative path is 'mx\remoting\NetServices.as'.
The code in the NetServices.as file is this:
class mx.remoting.NetServices extends Object
Anyone have any ideas? The more I read online how to get this to work, the more I get confused. I have copied and moved .as files in every way I can image. And also changed class paths in the preferences and in the publish settings.
I want to use ColdFusion with Flash. I have read about Flash Remoting but do not want to use the DataGrid. I want to query my database and display the recordset data in Flash.
I was able to get the remoting components and classes installed. Not sure if I put them in the right place. Went to the class path in the publish settings. Now it finds the NetServices.as file. But here is the error I am getting with source below it.
Classes may only be defined in external ActionScript 2.0 class scripts.
class mx.remoting.NetServices extends Object
The problem is it is written in action script 1. It won't let me change the class path in the publish settings. if I change it to AS2 it lets me change the path but I get this error because the context is wrong. If you have the CF WACK book it is chapter 26 Flash remoting.
Now i tried a new approach. Instead of this:
#include "NetServices.as"
#include "DataGlue.as"
I tried this:
import mx.remoting.NetService
import mx.remoting.debug.NetDebug
Now I get the following error.
The class 'mx.remoting.NetServices' needs to be defined in a file whose relative path is 'mx\remoting\NetServices.as'.
The code in the NetServices.as file is this:
class mx.remoting.NetServices extends Object
Anyone have any ideas? The more I read online how to get this to work, the more I get confused. I have copied and moved .as files in every way I can image. And also changed class paths in the preferences and in the publish settings.