Thema: Prototype
Beiträge zum Thema "Prototype"
| Prototype: TextFormat.setFont [Flash 8]Alternative Schriftauswahl
TextFormat.prototype.setFont = function() {
var suche = arguments.split(","), font_liste = (TextField.getFontList().toString()+",").toLowerCase();
for(var i=0;suche.length;i++) {
if(font_liste.indexOf(( [...]
|
| Prototype: String.shuffle [Flash 8]String in zufälliger Reihenfolge sortieren
String.prototype.shuffle = function() {
var str = "", temp_str = this.split("");
while(temp_str.length) {
str += temp_str.splice(random(temp_str.length),1);
}
return str;
}
[...]
|
| Prototype: Math.zufallZwischen [Flash 8]Zufallswert zwischen min/max
// Zufallswert von pmin bis pmax
Math.zufallZwischen = function(pmin, pmax) {
return (pmin + Math.floor(Math.random() * (pmax - pmin + 1)));
};
// Verwenden
trace(Math.zufallZwischen(-5, 5));
|
| Prototype: String.dateToTimestamp [Flash 8]Wandelt ein Datum-String in Timestamp um
String.prototype.dateToTimestamp = function(lang) {
var temp_str = this.split("."), temp_str_2 = temp_str.split(":");
return new Date(int(temp_str_2)).getTime();
}
// Optional "en" Angabe für englisc [...]
|
| Prototype: Array.rand [Flash 8]Liefert einen oder mehrere zufällige Einträge eines Arrays
Array.prototype.rand = function(nr,i,temp_ary,temp_ary_2) {
if(temp_ary.length == undefined) {
var i = 0, temp_ary = ;
for(var j in this) temp_ary_2.push(this);
}
i++;
if(i< [...]
|
| Prototype: Array.shuffle [Flash 8]Array in zufälliger Reihenfolge sortieren
// ## Ohne Typ Umwandlung: ############################
function rand() {
return random(3)-1;
}
Array.prototype.shuffle = function() {
return this.sort(rand);
}
ASSetPropFlags(Array.prototy [...]
|
| Prototype: delete_all [Flash 8]Mehrere Variablen auf einmal löschen
// FH delete_all
//
// Copyright (C) 2003 Sebastian Wichmann :: sebastian at flashhilfe.de
// This Software is distributed under the GNU General Public License.
//
// http://www.flashhilfe.de
_ [...]
|
| Prototype: XMLSA 1.4 [Flash 8]XML Simple Array hilft auf einfache und intutive Weise.
/*---------------------------------------------------------------------------
XMLSA for Flash MX v1.4
-----------------------------------------------------------------------------
Created [...]
|
| Prototype: Array_unique(); [Flash 8]Entfernt doppelte Werte aus einem Array
// FH Array_unique
//
// Copyright (C) 2003 Sebastian Wichmann :: sebastian at flashhilfe.de
// This Software is distributed under the GNU General Public License.
//
// http://www.flashhilfe.de
[...]
| |
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News
Regeln & Bedingungen
|