I installed my shiny new copy of Flash CS3 today and (after playing around with the new features) immediately was greeted with errors when compiling the Remoting project I’m working on.
The fix is to copy the needed packages from your Flash 8 install to a Classpath that Flash CS3 is looking for (best to make a new one rather than dump them with the CS3 classes). The old ones live in Macromedia Flash 8 -> First Run -> Classes -> mx and the packages you need are data, remoting, rpc, and services or you can download this zip file.
Remoting always seems to be the bastard step-child that is last to be updated or documented, with Flash 8 it was a couple of months before Macromedia decided to release the remoting components. Of course with AS3 you don’t need these packages as you use NetConnection instead like this or this.
14 Comments
Isn’t it all kind of pointless w/o the NetConnection Debugger? It’s back to the dark ages w/ CS3.
The NetConnection debugger was always buggy for me so I don’t miss it that much, I’ve been using Charles http://www.xk72.com/charles/wiki/flash_remoting or Service Capture http://kevinlangdon.com/serviceCapture/ instead.
It only worked for me when I defined the classpath search on the publishing settings for the movie.. but it worked after all
Hmmm.
I am having some issues with this method. If I don’t include the classpath or include a invalid classpath, I get the expected class not found errors, but if I include the correct path I get ~100 errors on compilation complaining like below:
The class being compiled, ‘mx.remoting.NetServiceProxyResponder’, does not match the class that was imported, ‘NetServiceProxyResponder’.
The class or interface ‘mx.remoting.NetServiceProxyResponder’ could not be loaded.
The class being compiled, ‘mx.remoting.NetServiceProxy’, does not match the class that was imported, ‘NetServiceProxy’.
The class or interface ‘mx.remoting.Connection’ could not be loaded.
.
.
.
Any ideas ? I’ve tried clearing ASO etc
If I include the path on the FLA in publish settings then all seems ok, but this means for any remoting project I have to go an set up classpaths etc.
would someone be so kind as to tell me exactly where to put the files and how to make my flash 8 fla work in cs3? (probably a dumb question. sorry) perhaps an example file?
thanks…
@Matt
The easiest way (for a 1 off project) is to download the zip in the original post, and extract to your the same folder where your project lives. Flash will always look for classes from where your FLA resides as root
If you want to use the remoting classes on multiple projects, put the mx folder somewhere central (like c:\dev) and then map a classpath to your FLA : file > publish settings > (flash tab) actionscript 2.0 settings > classpath (target) > browse for where you created you common class location (c:\dev). Yiou can add as many classpaths as you require for each FLA.
You should check out ssr. http://osflash.org/projects/ssr. It works a lot like as3lrf but there is no need for listeners which is a bad implementation for remoting. The downside of as3lrf is that you add listeners to the actual service object. But let’s say you make 3 service calls, each result gets mapped to the same onResult handler. That’s screwy. With ssr you declare onResult and onFault handlers with each service call, you can also specify a maxAttempt limit and a timeout interval. SSR is a better replacement for a remoting package.
Thank you!!! Thanks to your files, which I skillfully pasted into “C:\Documents and Settings\USERNAME\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration\Classes” and “C:\Program Files\Adobe\Flash CS3\en\Configuration\Classes” I now have flash remoting working in Flash 9.
Thanks to Aaron Smith for pointing out ’ssr’!!
thanks, for the suggestion.
Hi All,
I copy the files to the path that you said.
Still not working for me.
This is the code that I’m using
Here is my code that I’m using:
import mx.remoting.NetServices;
import mx.remoting.NetDebug;
mx.remoting.debug.NetDebug.initialize();
import mx.controls.Alert;
import mx.controls.gridclasses.DataGridColumn;
import BubbleMovieClip;
import com.Msgs;
// Set up variables for the URL and service paths
var myURL = “http://localhost/flashservices/gateway”;
var servicePath = “com.myDomain.myApp”;
// Connection hasn’t been initialized; create connection and service objects
if (initialized == null) {
initialized = true;
NetServices.setDefaultGatewayUrl(myURL);
var myConnection_conn = NetServices.createGatewayConnection();
var myService = myConnection_conn.getService(servicePath, this);
}
Do I have to change anything?
Thanks
Johnny
Thanks for still providing this info!
You saved my day!
Win 7 : CS4 PATH
C:\Users\USERNAME\AppData\Local\Adobe\Flash CS4\en\Configuration\Classes\mx
I’m using MAC
Does anyone know about the path to put class file on MAC?
and I use CS5 didn’t find something like “flash” or “mx” file in the /Libary/Application Support/Adobe….
3 Trackbacks
[...] http://blog.vixiom.com/2007/04/17/actionscript-20-flash-remoting-with-flash-cs3/ [...]
[...] blog van Vixiom Axioms met interessante comments… [...]
[...] por el mismo problema encontre este link en que relataba lo mismo que hice yo anteriormente y que en ste caso asombrosamente le [...]