1&1 DSL
Flashhilfe.de - Flash Community

Prototype: Array.find [Flash 8]

Forum > Tipps & Tricks zu Flash, Flex und Adobe AIR > Prototype: Array.find

 


AntwortenRegistrieren Seite1  

 08.07.2003, 11:37 
Benutzerbild von SebastianFlashhilfe.de Moderator
Beiträge: 6940
Wohnort: München
Registriert: Jan 2002

Prototype: Array.find
Findet Eintrag im Array und gibt true zurück

Prototype:
ActionScript:
1
2
3
4
5
Array.prototype.find = function(eingabe) {
  for(var i in this) if(this[i] === eingabe) return true;
  return false;
}
ASSetPropFlags(Array.prototype,"find",1,true);


Beispiel Aufruf:
ActionScript:
1
2
test_ary = ["Fr 02.04.2004","Fr 02.04.04","02.04.2004","2.4.04","02.04.04"];
trace(test_ary.find("Fr 02.04.04"));

Flex Freelancer || Flashhilfe @ Twitter || XING Profil
Schlagwörter: Array, prototype
 
Themen
Ähnliche Beiträge zum Thema
 

AntwortenRegistrieren Seite1  

Schnellantwort

Du musst registriert sein, um diese Funktion nutzen zu können.
Partner Webseiten: DesignerInAction.de   Designnation.de   Mediengestalter.info   php-resource.de   phpforum.de   phpwelt.de   Pixelio.de   PSD-Tutorials.de   Tutorials.de

Haftungsausschluss   Datenschutzerklärung   Hier Werben   Impressum
© 1999-2012 Sebastian Wichmann - Flashhilfe.de