LoadVars onHTTPStatus [AS 2]
Klasa: LoadVars
Kompatybilność: ActionScript 1.0, Flash 6+
onHTTPStatus = function(httpStatus:Number) {}
Wywołuje się, gdy Flash Player odbiera kod statusu HTTP od serwera.
Listing
var mojLoadVars:LoadVars = new LoadVars();
mojLoadVars.onHTTPStatus = function(httpStatus:Number) {
this.httpStatus = httpStatus;
if(httpStatus < 100) {
this.httpStatusType = "BłądFlash";
}
else if(httpStatus < 200) {
this.httpStatusType = "informacyjny";
}
else if(httpStatus < 300) {
this.httpStatusType = "pomyślnie";
}
else if(httpStatus < 400) {
this.httpStatusType = "przekierowanie";
}
else if(httpStatus < 500) {
this.httpStatusType = "clientError";
}
else if(httpStatus < 600) {
this.httpStatusType = "BłądSerwera";
}
}
mojLoadVars.onData = function(src:String) {
trace(">> " + this.httpStatusType + ": " + this.httpStatus);
if(src != undefined) {
this.decode(src);
this.loaded = true;
this.onLoad(true);
}
else {
this.onLoad(false);
}
}
mojLoadVars.onLoad = function(sukces:Boolean) {
}
mojLoadVars.load("http://blogs.adobe.com/mxna/flashservices/getMostRecentPosts.cfm");
mojLoadVars.onHTTPStatus = function(httpStatus:Number) {
this.httpStatus = httpStatus;
if(httpStatus < 100) {
this.httpStatusType = "BłądFlash";
}
else if(httpStatus < 200) {
this.httpStatusType = "informacyjny";
}
else if(httpStatus < 300) {
this.httpStatusType = "pomyślnie";
}
else if(httpStatus < 400) {
this.httpStatusType = "przekierowanie";
}
else if(httpStatus < 500) {
this.httpStatusType = "clientError";
}
else if(httpStatus < 600) {
this.httpStatusType = "BłądSerwera";
}
}
mojLoadVars.onData = function(src:String) {
trace(">> " + this.httpStatusType + ": " + this.httpStatus);
if(src != undefined) {
this.decode(src);
this.loaded = true;
this.onLoad(true);
}
else {
this.onLoad(false);
}
}
mojLoadVars.onLoad = function(sukces:Boolean) {
}
mojLoadVars.load("http://blogs.adobe.com/mxna/flashservices/getMostRecentPosts.cfm");
Dodano przez: divix
Ranga: Administrator serwisu Punktów: 0
Ranga: Administrator serwisu Punktów: 0
Komentarze użytkowników
:: Losowe artykuły
:: Wymiana linków
Modowe inspiracje |
Android Gry i Aplikacje |
ZaplanujTransport.pl: Przeprowadzki, transport, aukcje |
Logo dla firmy |
Change Tires - Car Weather Forecast Reminder |
Laminas: MVC Framework for PHP |
IT Books Reviews and Programming: JS, JAVA, PHP, ANDROID, CSS |
Katalog roślin |
Programming articles: JAVA, PHP, C++, Python, JavaScript |
Kancelaria Adwokacka Łukasz Huszno