Flash CS3 and AS2
greenSkin - May 14, 2008 - 21:05
| Project: | AMFPHP |
| Version: | HEAD |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
How can I connect to the AMFPHP service in Drupal with Actionscript 2 inside of Flash CS3? All of the examples I can find either are deprecated with Flash CS3 or utilize AS3. Any help?

#1
Subscribe.
#2
i don't use as2 anymore, but i found this in the net :
it's an example for flash 8, but as2 is as2 ( example found on http://snippets.dzone.com/posts/show/3367 )
change the localhost to what's appropriate for you.
<?php
// remoting
import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();
var myResponder:RelayResponder = new RelayResponder(this,"say_Result","say_Fault");
var site:Service = new Service("http://localhost/services/amfphp",null,"HelloWorld",null,myResponder);
var temp_pc:PendingCall = site.say("Hola chicos!");
function say_Result(re){
trace(re.result);
}
function say_Fault(result){
trace("error!");
}
?>
#3
The problem was Flash CS3 doesn't include the 'remoting' and the 'rpc' classes so they cannot be imported. I will attach a zip file containing the needed classes and instructions on how to include them.
#4
ok googled a few secs on 'flash cs3 remoting' and it seems that there are no remoting objects for as2 in flash cs3.
There is a solution. I'll include the links
basic explanation : http://blog.vixiom.com/2007/04/17/actionscript-20-flash-remoting-with-fl...
adobe forum ( with extended explanation ) : http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&...
so after you're going through the steps to setup your box, you should be able to compile remoting as2, the examples should work.
i'll hope this will be a success, and to hear from you if it's works.
Joachim
#5
If using Flash CS3 and need to use remoting for ActionScript 2.0, copy the attached files to your Flash directory.
#6
i have used these file in my flash directory, but did not get success, what might be other issues, to be take under consideration.
Shahid Hazoor