Skip to content

Instantly share code, notes, and snippets.

@ZoczuS

ZoczuS/cd.as

Created May 22, 2014
Embed
What would you like to do?
package {
import flash.net.*;
import flash.system.*;
import flash.events.*;
import flash.external.ExternalInterface;
import flash.display.*;
import flash.text.*;
public class cd extends Sprite{
public var room:Loader;
public var loader:URLLoader;
public function cd (){
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
try {
ExternalInterface.call("console.log", "Start");
this.request();
} catch(e:Error) {
trace(e);
}
}
public function request() {
var x:URLRequest = new URLRequest();
x.url = "http://maps.yandex.com/";
x.method = URLRequestMethod.GET;
x.data = "";
loader.load(x);
}
public function loaderCompleteHandler(arg1:Event):void {
ExternalInterface.call("console.log", loader.data);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.