pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

swx private pastebin - collaborative debugging tool What's a private pastebin?


Posted by Omi on Mon 28 Jul 03:02
report abuse | download | new post

  1. import org.swxformat.*;
  2. import flash.events.*;
  3.        
  4. //Vars
  5. var handlers:Array = new Array("result", "timeout", "fault", "progress"); // Possible callbacks
  6. var lcSC:LocalConnection = new LocalConnection(); // LC for SWX > Connecter
  7. var lcCS:LocalConnection = new LocalConnection(); // LC for Connecter > SWX
  8. var swx:SWX = new SWX();
  9.  
  10. lcSC.allowDomain("*");
  11. lcSC.connect("_lcSC");
  12. lcSC.call = function(callDetails:Object):Void {
  13.         //Set up all callbacks
  14.         for(var handler in handlers) {
  15.                 callDetails[handlers[handler]] = [this, connecterHandler];
  16.         }
  17.         //Call
  18.         swx.call(callDetails);
  19. }
  20. lcSC.setVar = function(varName, varValue):Void {
  21.         swx[varName] = varValue;
  22. }
  23. lcSC.cancelAllCalls = function():Void {
  24.         swx.cancelAllCalls();
  25. }
  26.  
  27. // Handles all callbacks
  28. function connecterHandler(ev:Object) {
  29.         //Tell SWX about callback
  30.         lcCS.send("_lcCS","SWXhandler", ev);
  31. }
  32.  
  33. //Tell SWX we're ready
  34. lcCS.send("_lcCS","onConnecterReady");

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post