Created
May 22, 2014 09:42
-
-
Save ZoczuS/bc34f9d5acd5b958eb7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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