macromedia flash flash remoting:
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. Does anyone have some examples of this? Or tutorials to get me started?
First let me say that I haven't messed with CS3 yet, I am still working with an older flash movie which uses as2. That said, the results of a flash remoting call do NOT have to be displayed in a datagrid only. You can get the results from the query returned as a recordset and then do whatever you like with the recordset. Insert them into a multi select box, loop over and display them in dynamic text boxes, the options are endless. All depends on what you want to do.
I found a good tutorial in Forta's WACK book on Flash remoting using ColdFusion. This doesn't seem to work with Flash CS3 using AS2. #include "NetServices.as" #include "NetDebug.as" Did they remove this from Flash CS3?
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 becuase the context is wrong. If you have the CF WACK book it is chapter 26 Flash remoting.
I believe the book that you are using is out dated. You don't need those files anymore. As you said, they are AS1 and you are using AS2. The help files in Flash should be able to give you a better lead on things. I am still using Flash MX Professional 2004, so things might have changed in CS3, but there is an entire section in Help entitled "using flash remoting MX 2004". In that it talks all about the different classes and gives examples and everything. That should give you all you need.
I almost got it to work. Instead of this approach: #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.
Can anyone help? Please? I am so confused. There are so many parts to this to get it working. The FLA, the classes, the debugger, the server, ColdFusion, the cfc. Any one of these could be the problem.
Don't see what you're looking for? Try a search.
|