PDA

View Full Version : Flash Remoting using CS3 and AS2


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.

mallen
09-13-2007, 06:16 PM
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.

the ev
09-14-2007, 09:52 AM
Check out this Adobe thread: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=250&threadid=1264156&enterthread=y

Scroll down to an entry by jedders (about half-way down); he has a very explicit, step-by-step guide to what files you need to copy where to get Remoting working in CS3. Worked for me. Good luck!

mallen
09-14-2007, 12:36 PM
Yeah I have tried that and I couldn't find this file RemotingConnector.swc

the ev
09-14-2007, 06:46 PM
http://download.yousendit.com/374FDFE2095E8F51

(Note: I haven't used YouSendIt before, so let me know if that doesn't work.)

mallen
09-21-2007, 03:08 AM
Thanks for the file. I installed it but still can't get remoting to work. Hopefully someone with Flash CS3 can get it working and send me a small test example so I know if its my set up, the files, or the components. There are so many things that have to work together.

J_Miller
09-24-2007, 07:52 PM
Mallen...

I posted on another topic where I included a bunch of files that can get you going. Its a .NET example, but if you like I can provide you with the same in ColdFusion....the only difference between the two is how you define your gateway really. In my examples I do not use the RemotingConnector, I just use the classes directly in a very straight forward fashion. Take a look at it and let me know if you have any specific questions......would love to help get you off the ground on this one if its still an issue for you

http://www.actionscript.org/forums/showthread.php3?t=138685

Hope that helps!

Jason

mallen
09-25-2007, 03:42 AM
Thanks for getting back to me. Yes a ColdFusion example would be great. I just need a simple FLA, .cfc, maybe a small access file. Like search this and display this.... And a 1.2.3 step. I was confused over the Netdebugger because it had a login and it sas its not connected. I remember using a local Flash Sever when I tried it with MX years ago and it was so easy.

buhayjason
12-07-2007, 03:19 AM
Mallen,

Were you able to work it out? flash remoting in CS3 AS2? i am just curious coz i am about to use flash remoting with java. ;)

buhayjason
12-08-2007, 01:09 PM
where should i save my Java class so that i can access it using remoting?