ActionScript 3: Send GET/POST

Filed Under (Uncategorized) by ashardi on 24-09-2011

At the office, we recently developing some digital signage products, which requiring ActionScript to take part. So, here is a little code snippet of how to send GET/POST variables from AS3:

import flash.net.*;
var url:String = "http://192.168.1.1:1234/";
var request:URLRequest = new URLRequest(url);
request.method = URLRequestMethod.GET;

var variables:URLVariables = new URLVariables();
variables.name = "Anton Ashardi";
request.data = variables;

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete);
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.load(request);

function onComplete (event:Event):void {
trace(event.target.data);
}

Add Latest Python Interpreters to Aptana Studio 3 using PyDev on OS X Leopard

Filed Under (Uncategorized) by ashardi on 07-09-2011

OS X Leopard (1.5.8) came with pre-installed Python 2.5, so, when you trying to add Python interpreters on Aptana Studio 3 by clicking the “Auto Config” button, you will get Python 2.5… of course :-p

So, download the lates Python for Mac OS X from here: www.python.org/download/ , and then Read the rest of this entry »