if (my == 0) { //Check Internet Connection// var connected:Boolean = false; function checkConnection():Void { var myLoadVars:LoadVars = new LoadVars(); myLoadVars.onHTTPStatus = function(httpStatus:Number) { if (httpStatus != 0) { connected = true; //Run Updater// updateXML(); //function jika ada internet// } else { connected = false; //Run from memory// collectXML(); //function jika tiada internet// } delete this; }; myLoadVars.load("http://galeri.finas.gov.my/"); //guna www.google.com pun boleh// } checkConnection();
Boleh nampak ker? Just testing dengan syntaxHighligher untuk Blogger. Kalau ada sebarang komen sila beritahu penulis tentang syntaxHighlighter ni.
Tiada ulasan:
Catat Ulasan