Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

Single-Line commenting in Actionscript with Textmate

- open the bundle editor and select the Actionscript bundle
- use the add button to make a new preference item, give it a scope of source.actionscript
- name it whatever
- paste in the following:

{   shellVariables = (
        {   name = 'TM_COMMENT_START';
            value = '// ';
        },
    );
}


- that's it! got these instructions on IRC from Infininight: http://pastie.textmate.org/private/clmfldbv2sexjcd7u6qjw

Flash 8 AS2 REMOTING with AMFPHP

This code should be used to perform remoting with Flash 8 using ActionScript 2.

// 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 siteCFC:Service = new Service("http://127.0.0.1/flashservices/gateway.php",null,"HelloWorld",null,myResponder);
var temp_pc:PendingCall = siteCFC.say("Hola chicos!");

function say_Result(re){
	trace(re.result);
}
function say_Fault(result){
	trace("error!");
}
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS