{lang: 'de'}
Flashhilfe.de - Flash Community

Flash CS2 - Tutorials und Tipps

 
Adobe Flash/Flex Tutorials, Tipps und Code Snippets
Benutzerbild von italia

Adressleiste (URL) auslesen
04.02.2010 - 11 Kommentare - italia
Hallo zusammen, vielleicht ist es für die Profis unter uns lachhaft, aber für uns Andere ganz interessant. Wie kann ich die Adressleiste meines Browsers aus Flash auslesen? So: import flash.external.*; var hostname = "window.location.hos [...]
Benutzerbild von Vampire

Tooltip Klasse mit DropShadow
01.10.2009 - 13 Kommentare - Vampire
Schlagwörter: Tooltip
Hallo zusammen, ich habe eine kleine Tooltip-Klasse geschrieben, die ich euch gern zur Verfügung stellen möchte. - Katalogisieren von Tooltips - Anzeige von nicht-katalogisierten Tooltips - Verzögertes oder sofortiges Anzeigen der Toolti [...]
Benutzerbild von Visie

Prototype: preMenuConstructionKit
07.04.2009 - 0 Kommentare - Visie
Schlagwörter: Movieclip, prototype
Recursive Menu Constructor MovieClip.prototype.___preMenu = function (xml:Object, targetnode:String) { trace(this) var infinity:Number = 0; var targetnode:Object = (targetnode == null || targetnode == undefined) ? "subnavigation" : targetnode [...]
Benutzerbild von Alagandor

Prototype: Array.findnumber
01.03.2009 - 0 Kommentare - Alagandor
Schlagwörter: Array, prototype
Prototype, um die Indexzahl eines Wertes zu erhalten Array.prototype.findnumber = function(eingabe) { for (i=0; i<=this.length; i++) { trace(this); if (eingabe == this) { return i; } } }; ; trace(Beispiel.findnumber("Wert4")); [...]
Benutzerbild von BackToDos

Prototype: MovieClip.prototype.smoothCont
19.03.2008 - 2 Kommentare - BackToDos
Schlagwörter: Movieclip, prototype
glättet den Inhalt eines MovieClips /** * glättet den Inhalt eines MovieClips (bei Bildern sinnvoll). * Funktioniert anscheinend aber nicht, wenn das Bild nicht auf der selben Domain ist ... */ MovieClip.prototype.smoothContent = function (): [...]
Benutzerbild von burnZ

[HOT] Datenaustausch via JSON
06.03.2008 - 16 Kommentare - burnZ
Schuld ist eigentlich das ich dazu komme dieses ersmal kleine...hmm ja Tutorial zu schreiben. Eigentlich sollte etwas größeres entstehen was dann ein richtig Tutorial für das großes werden sollte, aber eigentlich halte ich es für angebrach [...]
Benutzerbild von BackToDos

Prototype: Array.prototype.group
13.12.2007 - 2 Kommentare - BackToDos
Schlagwörter: Array, prototype
gruppiert und zählt die Elemente eines Arrays /** * diese Methode gruppiert alle Elemente eines Arrays zählt diese dann gruppenweise durch * und gibt ein Array zurück, welches an jeder Stelle ein Ursprungselement und seine Häufigkeit enthält [...]
Benutzerbild von Madokan

Flash 8 Dokumentation (Download)
04.09.2007 - 2 Kommentare - Madokan
So nun ist die Dokumentation zu Flash 8 endlich auch separat erhältlich. Bisher jedoch lediglich in Englisch! Downloads: http://www.macromedia.com/support/documentation/en/flash/ Ihr könnt zwischen PDF und HTML wählen und auch entscheiden [...]
Benutzerbild von BackToDos

[Flash/PHP] newsletter
24.07.2007 - 2 Kommentare - BackToDos
in dem heutigen kleinen Tut geht es darum, wie man mit flash und php ein newsletterprogram machen kann ... die Frage kam hier auf: http://flashhilfe.de/forum/off-topic/newsletter-software-ot-194986-194986.html es wäre etwas geschickter und vor [...]
Benutzerbild von valuee

Dateigröße verkleinern bei nachgeladenen SWFs
14.06.2007 - 0 Kommentare - valuee
Wenn SWF-Dateien nachgeladen werden und diese Dateien Klassen verwenden, die bereits im Root-SWF importiert wurden, dann sind diese Klassen ja mehrmals kompiliert. Das ist nicht nötig, da der Root-Film die Klassen ja bereits kennt. Möchte man d [...]
Benutzerbild von burnZ

Prototype: Foreach
13.06.2007 - 0 Kommentare - burnZ
Schlagwörter: asbroadcaster, prototype
Auf jedes Item ein Callback Anwenden Array.prototype.foreach = function( callback:Function ) { for( var index:String in this ) callback( index, this ); } ; function traceIt( index:String, item:Object ):Void { trace( item.name + '/' [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.ll_quad
23.05.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
viereck in neuen MC zeichnen (pfad ungebunden) MovieClip.prototype.ll_quad = function (_tt:String, _d:Number, _nmc:String, __xtl:Number, __ytl:Number, __xtr:Number, __ytr:Number, __xbr:Number, __ybr:Number, __xbl:Number, __ybl:Number, __v:Boolean, [...]
Benutzerbild von realClover

Die ZigoEngine von Moses
20.05.2007 - 0 Kommentare - realClover
Hi Leutz, muss jetzt einfach mal n bissel Werbung für die ZigoEngine machen. ^^ Für Alle die sie noch nich kennen: Da es manchmal ziemlich schwierig ist mit der Tween-Klasse von Flash um zu gehen bzw. auch Zeit und Tipparbeit kostet eine kom [...]
Benutzerbild von Lenzoi

There is no method with the name ...
18.05.2007 - 0 Kommentare - Lenzoi
Hier eine kleine Feststellung, die mich jetzt einiges an Zeit gekostet hat, was ich anderen Leuten ersparen will: Beispiel: import calendar.*; class DayView{ private var calendar:Calendar; public function DayView(){ cal [...]
Benutzerbild von BackToDos

Prototype: .prototype.attachedMovies
12.05.2007 - 0 Kommentare - BackToDos
Schlagwörter: Movieclip, prototype
fügt neue eigenschaft hinzu, in der attachte mcs sind //definiere eine Funktion, die uns später nen String mit allen attachten Movies gibt var toString:Function = function ():String { var a:Array = new Array(); for (var s:String in this) { [...]
Benutzerbild von wolf81

Prototype: MovieClip.prototype.Rectangle_
29.04.2007 - 0 Kommentare - wolf81
Schlagwörter: Movieclip, prototype
einfaches dynamische Rechteck //Schnelles Rechteck dynamisch erstellen // author: Wolf81 // date: 29_04_2007 // //sehr einfaches und schnelles Rechteck z.b. für dynamische Hintergrundflächen //keine Auswahl von Erstellungsrichtung //kein [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.ll_fills
15.04.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
Bitmap-Füllung aus Bibliothek auf mc anwenden (einfach) MovieClip.prototype.ll_fills = function(BitmapDataItem) { this._bdi = BitmapDataItem; var tile:BitmapData = BitmapData.loadBitmap(this._bdi); this.beginBitmapFill(tile); this.moveTo(0 [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.ll_fill
15.04.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
Bitmap-Füllung aus Bibliothek auf mc anwenden MovieClip.prototype.ll_fill = function(GlobalMarginLeft, GlobalMarginTop, GlobalMarginRight, GlobalMarginBottom, BitmapDataItem, BitmapDataAlpha, debug) { this._gml = GlobalMarginLeft; this._gmt = [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.ll_pos
15.04.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
Positions- und Eiganschaftswerte "fließend" ändern MovieClip.prototype.ll_pos = function(newHeight, newWidth, newX, newY, newSP, newSPD, newSPK, newAlpha, round, callback, debug) { this._dx = newX; this._dy = newY; this._dh = newHeight; t [...]
Benutzerbild von BackToDos

Prototype: String.prototype.chunkSplit
13.04.2007 - 0 Kommentare - BackToDos
Schlagwörter: prototype, String
Teilt einen String in Teilstücke gleicher Länge /** * Ähnlich str_split in PHP. Teilt einen String in höchstens limit Teile der chunkLength und gibt das Ergebnis als Array zurück */ String.prototype.chunkSplit = function (chunkLength:Number [...]
Benutzerbild von BackToDos

Prototype: String.prototype.pad
11.04.2007 - 0 Kommentare - BackToDos
Schlagwörter: prototype, String
String auffüllen /** * Diese Methode füllt den String bis zu einer gewissen Größe auf, mit übergebenen Argument padString. * Es kann von links, von rechts und beidseitig gepaddet werden. * Das Verhalten ist dem von PHP's str_pad gleich ... [...]
Benutzerbild von BackToDos

Prototype: intrinsic class
11.04.2007 - 0 Kommentare - BackToDos
Schlagwörter: intrinsic class, prototype
Das finden und anpassen intrinsischer Klassen /*Das hier ist kein prototype, allerdings recht wichtig im Zusammenhang mit der richtigen Verwendung. Flash unterstützt dass Konzept "intrinsischer" Klassen, die man lediglich deklariert, deren Imp [...]
Benutzerbild von BackToDos

Prototype: Array.prototype.walk
10.04.2007 - 0 Kommentare - BackToDos
Schlagwörter: Array, prototype
Führt eine Funktion für jeden Index eines Arrays aus = function (todo:Function) { for (var i:Number = 0;i<this.length;i++) { todo.apply(this,); } } //rechne Partialsummen einer Folge aus ... :D var f:Function = function (index:Number) [...]
Benutzerbild von BackToDos

Prototype: Array.prototype.fill
10.04.2007 - 0 Kommentare - BackToDos
Schlagwörter: Array, prototype
füllt ein Array /* gibt ein Array zurück, welches mit dem Ursprungsarray beginnt und auf die neue Länge mit einem bestimmten wert aufgefüllt wird. Ist die neue Länge kürzer als die Ursprungslänge, wird das Array einfach gekürzt. das urspr [...]
Benutzerbild von BackToDos

Prototype: Object.prototype.id
10.04.2007 - 0 Kommentare - BackToDos
Schlagwörter: object, prototype
gibt automatisch bei Bedarf jedem Objekt in Flash eine einzi /* * dies erlaubt, dass man von jeder Variable eine id abrufen kann ... * diese wird erst erstellt, wenn man das erste Mal auf sie zugreift */ var idCounter:Number = -1; var g:Functi [...]
Benutzerbild von BackToDos

Prototype: Number.prototype.toString
20.03.2007 - 0 Kommentare - BackToDos
Schlagwörter: number, prototype
einen Bug aus der Standardroutine beheben /** * Dieser Prototype soll ein Flashinternes Problem lösen, dass beim * konvertieren von ganzzahligen Numbers in Strings bei anderen Basen als 10 (beispielsweise hex) auftaucht * ist die Basis nicht 10 [...]
Benutzerbild von mathis

Prototype: rotateTo
16.03.2007 - 0 Kommentare - mathis
Schlagwörter: Movieclip, prototype
Drehung mit Angabe des Zielwinkels, der Drehrichtung und der easing-Funktion // === dir === // short: den kurzen weg // long: den langen weg // ccw: gegen den uhrzeigersinn // cw: mit dem uhrzeigersinn MovieClip.prototype.rotateTo = function(e [...]
Benutzerbild von Sebastian

MTASC - Debuggen mit Firebug (mtasc2firebug)
15.03.2007 - 0 Kommentare - Sebastian
Manfred Weber hat in seinem Blog http://manfred.dschini.org ein Interessantes Tool zum Flash debuggen gepostet. http://manfred.dschini.org/2007/03/14/make-mtasc-talk-to-firebug/ http://manfred.dschini.org/2007/03/15/mtasc-2-firebug-improved/ Wer [...]
Benutzerbild von mathis

Prototype: smoothToMouse
21.02.2007 - 0 Kommentare - mathis
Schlagwörter: Movieclip, prototype
Mausverfolgung mit Angabe der maximalen Geschwindigkeit und Abbremsen am Ende MovieClip.prototype.smoothToMouse = function(maxSpeed, brakeDist) { this.onEnterFrame = function() { var difX:Number = this._parent._xmouse - this._x; [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.Pause
13.02.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
MC auf seiner Zeitleite pausieren lassen MovieClip.prototype.kaffeepause= function(dur) { this.stop(); this.clearduration= function() { clearInterval(this.newduration); delete this.newduration; delete this.clear [...]
Benutzerbild von manfred.weber

PHP SOAP Webservices mit Flash!
02.02.2007 - 0 Kommentare - manfred.weber
Hier ein kleines Tutorial zur Benutzung des Pear Packetes Services_Webservice mit Flash. Services_Webservice ist ein Packet mit dem man komfortabel Webservices und WSDL erstellt. Die Idee dazu kam mir als ich eine eine Weile mit C# experimentiert [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.typeWriter
25.01.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: prototype, textfield
Typewriter-Effekt TextField.prototype.typeWriter = function(tw_str, tw_speed, tw_random) { var tw_tf:TextField = this; var tw_i:Number = 0; var tw_txt:String = tw_str; var tw_int:Number; var tw_last:Function; var tw_random:Number; var [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.FadeOut
19.01.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
MC ausblenden (_alpha) MovieClip.prototype.fadeOut = function(speed) { this.onEnterFrame = function() { this._alpha -= speed; if (this._alpha<=0) { delete this.onEnterFrame; this._visible = false; } }; }; mein_mc.fadeOut(3); [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.FadeIn
19.01.2007 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
MC einblenden (_alpha) MovieClip.prototype.fadeIn = function(speed) { this.onEnterFrame = function() { this._alpha += speed; ac._visible = true; if (this._alpha>=100) { delete this.onEnterFrame; } }; }; mein_mc.fadeIn(3); [...]
Benutzerbild von Sebastian

Prototype: Number.format
19.12.2006 - 3 Kommentare - Sebastian
Schlagwörter: number, prototype
Tausender Punkte einfügen Number.prototype.format = function(nr,pt) { var str = "", s, v = this.toString(); while(s=v.substr(-nr)) { v = v.substr(0,-nr); str = (v.length!=0 ? pt : "")+s+str; } return str; } ASSetProp [...]
Benutzerbild von BackToDos

swapDepths mit einem Rahmen, der oben bleibt
14.12.2006 - 0 Kommentare - BackToDos
Dieses kleine Tut ist eine hoffentlich verständliche Komplettlösung des folgenden Problems: http://flashhilfe.de/forum/flash/swapdepths-aber-ein-mc-muss-oben-bleiben-194796-194796.html Die Lösungsidee: man erstellt einen Container (MC), in de [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp._SHELL
10.11.2006 - 0 Kommentare - bill-da-machade
Schlagwörter: Movieclip, prototype
Variablenwerte global schreiben und lesen // Um aus JEDER Zeitleiste oder Objektaktion heraus eine globale Variable zu definieren, setze ich auf den Prototype _SHELL. // Vorteil liegt darin, dass die Werte einer Variable ohne Pfadangaben erreichba [...]
abgemeldeter Benutzer
Alle Flashseiten ändern wegen dem neuen IE Update (AC_RunActiveContent.js)
31.10.2006 - 20 Kommentare - iacob777
Sehr geehrte User, Vor kurzem habe ich erfahren, dass es ein neues Internetexplorer Update gab und deshalb alle Flash Htmlseiten Codemässig neu Aktualisiert werden müssen. Mehr dazu hier: Ihr müsst die Seite gut durchlesen, das Jav [...]
Benutzerbild von bill-da-machade

Prototype: Movieclip.Prototyp.MoveObject
30.09.2006 - 1 Kommentar - bill-da-machade
Schlagwörter: Movieclip, prototype
Object-Positionswechsel bei Ereignis // in einen frame der Hauptzeitleiste schreiben MovieClip.prototype.moveobject = function() { dest = _root.xnew; pos = this._x; vel = (dest-pos)/1.5; this._x += vel; }; // das auf den mc der sich [...]
Benutzerbild von public

Prototype: Sound.mouseControl()
15.09.2006 - 0 Kommentare - public
Schlagwörter: prototype, Sound
kontrolle von volume und pan über die mouse mit der begrennzun von einem mc // Sound.mouseControl(target:MovieClip, maxVol:Number, cursor:Boolean) Sound.prototype.mouseControl = function(target:MovieClip, maxVol:Number, cursor:Boolean) { var sc [...]
Benutzerbild von public

Prototype: fadeVolume()
10.09.2006 - 0 Kommentare - public
Schlagwörter: prototype, Sound
hiermit kann man das Volumen faden Sound.prototype.fadeIn = function($targetVol:Number, $steps:Number) { var vol:Number = this.getVolume(); function interval($obj) { vol += $steps; $obj.setVolume(vol); updateAfterEvent(); if (vol == [...]
Benutzerbild von public

Prototype: getTotalTime
10.09.2006 - 0 Kommentare - public
Schlagwörter: prototype, Sound
getTotalTime Sound.prototype.getTotalTime = function():Number { if (this.getBytesLoaded()<this.getBytesTotal()) { return int(this.duration*this.getBytesTotal()/this.getBytesLoaded()); } else { return this.duration; } }; // somit is [...]
Benutzerbild von Oliver Storm

Flash Hilfe F1
09.08.2006 - 0 Kommentare - Oliver Storm
Kleiner aber feiner Tip. Wenn ihr in eurem Scriptfenster in Flash einen Befehl markiert und F1 drückt, so wird direkt die Hilfe zu dem Befehl aufgerufen! oli chess is a fun game, if played with shotguns!
Benutzerbild von Sickdog

Prototype: patternFill
03.08.2006 - 0 Kommentare - Sickdog
Schlagwörter: Movieclip, prototype
MC mit Hintergrundbild füllen und repeaten // // MovieClip.patternFill(tile:String, width:Number, height:Number):Void // // author: Tobias Friese // date: 26.01.2006 // ///// requirements // // // » import flash.display.BitmapData; // » [...]
Benutzerbild von Sickdog

Prototype: createRectangleMC
03.08.2006 - 0 Kommentare - Sickdog
Schlagwörter: Movieclip, prototype
schnell einen MC mit Rechteck erstellen // // MovieClip.createRectangleMC = function(instanceName:String, width:Number, height:Number, color:Color, alpha:Number, origin:String, depth:Number):MovieClip // // author: Tobias Friese // date: 25.01. [...]
Benutzerbild von Sickdog

Prototype: MovieClip.fitInto
03.08.2006 - 0 Kommentare - Sickdog
Schlagwörter: Movieclip, prototype
MC auf Bereich skalieren // MovieClip.fitInto(width:Number, height:Number):Void // // Author: Tobias Friese // Date: 20.01.2006 // MovieClip.prototype.fitInto = function(width:Number, height:Number):Void { var targetRatio = width / height [...]
Benutzerbild von Vampire

Prototype: Array.removeEmpty()
21.03.2006 - 0 Kommentare - Vampire
Schlagwörter: Array, prototype
Enfernt leere Einträge aus einem Array Array.prototype.removeEmpty = function() : Array { var cache_array:Array = new Array(); for (i=0; i<this.length;i++) if (this); return cache_array; }; var test:Array = new Array(); test = "Holga"; [...]
Benutzerbild von Sören C.

Color- & Convolution- & TransformationMatrix Links
27.01.2006 - 0 Kommentare - Sören C.
Hier einige Links zur Verwendung der neuen Flash8 Matrix Klassen, mir fiel es bis jetzt immer etwas schwer mich damit anzufreunden, vielleicht gehts euch genauso: http://www.macromedia.com/devnet/flash/articles/matrix_transformations.html http: [...]
Benutzerbild von sasasem

xml von fremden server laden
13.01.2006 - 0 Kommentare - sasasem
ewig gesucht: neben den ueblichen Macromedia vorkehrungen kann man auch so das System aushebeln: http://www.actionscript.org/forums/showthread.php3?t=40745 sucht am ende nach <?php $contents =implode ("",file("http://www.server.com/news.xml")); [...]
Benutzerbild von Madokan

Prototype: MovieClip.setzeMauszeiger
07.01.2006 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Benutzerdefinierter Mauszeiger // Benutzerdefinierte Mauszeiger MovieClip.prototype.setzeMauszeiger = function (unsichtbar) { if (unsichtbar) { Mouse.hide (); } this.onMouseMove = function () { this._x = _xmouse; this._y = _ymo [...]
Benutzerbild von Madokan

Prototype: MovieClip.setzeMausverfolger
07.01.2006 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Benutzerdefinierte Mausverfolger // Benutzerdefinierte Mausverfolger MovieClip.prototype.setzeMausverfolger = function (tempo) { this.onEnterFrame = function () { this._x += (_xmouse - this._x) / tempo; this._y += (_ymouse - this._y) / [...]
Benutzerbild von Sören C.

ExtendedMC Klasse
05.01.2006 - 0 Kommentare - Sören C.
Hier mal ne kleine Klasse die den Umgang mit Tweens ein bissl erläutert, vielleicht hilfts jemandem :o) import mx.transitions.Tween; import mx.transitions.easing.*; class com.sc.tests.flash8.ExtendedMovieClip extends MovieClip { private va [...]
Benutzerbild von thorsten heymann

Cached Flash8 die mit Symbolen verknüpften Klassen
28.11.2005 - 4 Kommentare - thorsten heymann
moin zusammen! hab echt ein grosses problem mit flash8 (trial version) ich hab ein mc (Verknüpfungsbezeichner = Uploader, AS2.0 Klasse Uploader) in der Bibliothek. zunächst erstmal alles ok. der Film läuft auch fehlerfrei. Das PROBLEM ist a [...]
Benutzerbild von Madokan

Flash 8 (Eastereggs - Tutorial)
21.09.2005 - 0 Kommentare - Madokan
Hi Folks, Hier haben wir noch was für Euch - das EasterEgg Tutorial zu Flash 8. Natürlich haben sich die Damen und Herren aus dem sonnigen Californien nicht lumpen lassen und gleich zwei EasterEgg platziert. Wir verrarten Euch, wie Ihr die [...]
Benutzerbild von Madokan

Flash 8 Publikation via Flash MX 2004
19.07.2005 - 2 Kommentare - Madokan
Fünf Schritte: 1. In Flash MX 2004 einen neuen Flash Film anlegen. 2. Einstellungen für Veröffentlichungen aufrufen. 3. Das im Anhang enthaltene Flash 8 Profil importieren 4. Im Reiter Flash überprüfen ob die Umstellung erfolgreich war - [...]
Benutzerbild von Madokan

Flash 8 Linksammlung
14.07.2005 - 0 Kommentare - Madokan
Flash Player 8: http://www.macromedia.com/software/flashplayer/public_beta/ Flash Player 8 Bug report: http://www.macromedia.com/bin/fp8betafeedback.cgi Convert2SWF8 - http://chall3ng3r.blogspot.com/2005/07/convert2swf8-now-available-for.ht [...]
Benutzerbild von Madokan

Prototype: MovieClip.fpsmeter_extended
03.06.2005 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Bildrate (im Trace oder Textfeld) MovieClip.prototype.fpsmeter_extended = function (aktion, ausgabe) { if (aktion == "start") { this.zaehler = 0; this.onEnterFrame = function () { this.zaehler++; }; this.anzeigen = function [...]
Benutzerbild von Madokan

Prototype: MovieClip.prototype.fpsmeter
29.05.2005 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
FPS Meter (Anzeige) MovieClip.prototype.fpsmeter = function () { this.zaehler = 0; this.onEnterFrame = function () { this.zaehler++; }; anzeigen = function () { trace(this.zaehler); this.z [...]
Benutzerbild von petalustik

Prototype: changeParam
23.05.2005 - 0 Kommentare - petalustik
Schlagwörter: Movieclip, prototype
smoothe Parameterveränderung MovieClip.prototype.changeParam = function(fps, step, param, aim, tol, mround) { /* create unique object: */ this = new Object(); this.mc = this; this.step = step; this.param = param; this.aim = aim; this [...]
Benutzerbild von Madokan

Prototype: Object.prototype.ZoomIntDiv
16.05.2005 - 0 Kommentare - Madokan
Schlagwörter: object, prototype
Zoom-Effekt (Objekte MovieClip und Schaltflächen-Instanzen) Object.prototype.ZoomIntervalDiv = function (pDim, pTempo, pBps) { var obj = this; clearInterval(obj.iv); obj.zoom = function () { if (obj._xscale < pDim - 1 / pTempo) { [...]
Benutzerbild von Madokan

Prototype: MovieClip.prototype.ZoomIntDiv
16.05.2005 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Zoom-Effekt (IntDiv-Variante) MovieClip.prototype.ZoomIntervalDiv = function (pDim, pTempo, pBps) { var obj = this; clearInterval(obj.iv); obj.zoom = function () { if (obj._xscale < pDim - 1 / pTempo) { obj._xscale = obj._xs [...]
Benutzerbild von Madokan

Prototype: MovieClip.prototype.ZoomInt
16.05.2005 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Zoom-Effekt (Interval-Variante) MovieClip.prototype.ZoomInterval = function (pOption, pDim, pTempo, pBps) { var obj = this; clearInterval(obj.iv); if (pOption) { obj.zoomIn = function () { if (obj._xscale < pDim) { [...]
Benutzerbild von Madokan

Prototype: MovieClip.prototype.ZoomAdd
16.05.2005 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Zoom-Effekt (Add-Variante) MovieClip.prototype.ZoomAdd = function (pOption, pDim, pTempo) { if (pOption) { this.onEnterFrame = function () { if (this._xscale < pDim) { this._xscale = this._yscale += pTempo; } else [...]
Benutzerbild von Madokan

Prototype: MovieClip.prototype.ZoomPulsar
16.05.2005 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Zoom-Effekt (Pulsar-Variante) MovieClip.prototype.ZoomPulsar = function (pDim, pTempo) { this.onEnterFrame = function () { if (this._xscale < pDim) { this._xscale = this._yscale += pTempo; } else if (this._xscale > pDim) { [...]
Benutzerbild von Madokan

Prototype: MovieClip.prototype.ZoomDiv
16.05.2005 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Zoom-Effekt (Div-Variante) MovieClip.prototype.ZoomDiv = function (pDim, pTempo) { this.onEnterFrame = function () { if (this._xscale < pDim - 1 / pTempo) { this._xscale = this._xscale + (pDim - this._xscale) / pTempo; this._ysca [...]
Benutzerbild von Madokan

Prototype: Object._Depth
16.05.2005 - 0 Kommentare - Madokan
Schlagwörter: object, prototype
Tiefe von Objekten setzen und auslesen (MovieClip, Schaltflächen und Textfelder) Object.prototype.addProperty ("_Depth", this.getTiefe = function () { return this.getDepth (); }, this.setTiefe = function (nr) { swapDepths.call (this, nr); [...]
Benutzerbild von Madokan

Prototype: Number.prototype.runden_extend
23.04.2005 - 0 Kommentare - Madokan
Schlagwörter: number, prototype
Erweiterte Version (Runden/Round) // -------------------------------------------------------------------- // Number.prototype.runden_extended // // Definition: zahl.runden(Rundungsmodus, DezimalZeichen, Genauigkeit) // // pModus - Rundungsmodu [...]
Benutzerbild von Madokan

Prototype: Runden (Klasse Extended)
23.04.2005 - 0 Kommentare - Madokan
Schlagwörter: Extended, prototype, Runden
Erweiterte Version // Runden.as // -------------------------------------------------------------------- // Klasse: Runden (Extended) // // Definition: Runden.runden_extended(pZahl, Rundungsmodus, DezimalZeichen, Genauigkeit) // // pZahl [...]
Benutzerbild von Madokan

Prototype: Runden (Klasse)
23.04.2005 - 0 Kommentare - Madokan
Schlagwörter: Extended, prototype, Runden
Runden Klasse - ActionScript 2.0 // -------------------------------------------------------------------- // Klasse: Runden (Runden.as) // // Definition: Runden.runden_extended(pZahl, Rundungsmodus, DezimalZeichen, Genauigkeit) // // pZahl [...]
Benutzerbild von Madokan

Prototype: Number.prototype.runden_nat
23.04.2005 - 0 Kommentare - Madokan
Schlagwörter: number, prototype
Runden (Kurzfassung) // -------------------------------------------------------------------- // Number.prototype.runden (round - shortversion) // // Definition: zahl.runden(Rundungsmodus, DezimalZeichen, Genauigkeit) // // pModus - Rundungsm [...]
Benutzerbild von Madokan

Prototype: Number.prototype.runden
23.04.2005 - 0 Kommentare - Madokan
Schlagwörter: number, prototype
Runden (Round) von Zahlen mit drei Modis // -------------------------------------------------------------------- // Number.prototype.runden // // Definition: zahl.runden(Rundungsmodus, DezimalZeichen, Genauigkeit) // // pModus - Rundungsmodu [...]
Benutzerbild von Madokan

Prototype: Date.getFirstDayOfMonth
09.01.2005 - 0 Kommentare - Madokan
Schlagwörter: date, prototype
Erster Tag im Monat // Erster Tag im Monat Date.prototype.getFirstDayOfMonth = function() { return ; } ASSetPropFlags(Date.prototype, "getFirstDayOfMonth", 1, true); // Verwenden datum = new Date(); ersterTag = datum.getFirstDayO [...]
Benutzerbild von Madokan

Prototype: Date.getQuarterOfYear
09.01.2005 - 0 Kommentare - Madokan
Schlagwörter: date, prototype
Quartal im Jahr // Quartal im Jahr Date.prototype.getQuarterOfYear = function() { return Math.floor(this.getMonth()/ 3)+1; } ASSetPropFlags(Date.prototype, "getQuarterOfYear", 1, true); // Verwenden datum = new Date(); trace(" [...]
Benutzerbild von Madokan

Prototype: Date.getMonthName
09.01.2005 - 0 Kommentare - Madokan
Schlagwörter: date, prototype
Monatsnamen (Bezeichnung) // Monat (Bezeichnung) Date.prototype.getMonthName = function(pMonat) { return } ASSetPropFlags(Date.prototype, "getMonthName", 1, true); // Verwenden datum = new Date(); monat = datum.getMonth(); a [...]
Benutzerbild von Madokan

Prototype: Date.getDayName
09.01.2005 - 0 Kommentare - Madokan
Schlagwörter: date, prototype
Wochentag (Bezeichnung) // Wochentag (Bezeichnung) Date.prototype.getDayName = function(pTag) { return } ASSetPropFlags(Date.prototype, "getDayName", 1, true); // Verwenden datum = new Date(); wochentag = datum.getDay(); // H [...]
Benutzerbild von Madokan

Prototype: Date.getLeapYear
09.01.2005 - 0 Kommentare - Madokan
Schlagwörter: date, prototype
Ermitteln von Schaltjahren // Schaltjahr Date.prototype.getLeapYear = function() { return ((new Date(this.getFullYear(), 2, 0).getDate()) == 29 ? 1 : 0); }; ASSetPropFlags(Date.prototype, "getLeapYear", 1, true); // Verwenden da [...]
Benutzerbild von Madokan

Prototype: Date.getPeriodOfYearHemisphere
09.01.2005 - 0 Kommentare - Madokan
Schlagwörter: date, prototype
Jahreszeiten (Nord/Süd-Halbkugel) // Jahreszeiten für die nördliche und südliche Hemisphere Date.prototype.getPeriodOfYearHemisphere = function(pSphere) { var monat = this.getMonth()+1; var tag = this.getDate(); if (pSphere) [...]
Benutzerbild von Kai Jansen

Prototype: Array.copy
04.01.2005 - 0 Kommentare - Kai Jansen
Schlagwörter: Array, prototype
Kopiert ein Array Array.prototype.copy = function() { return this.slice(0, this.length); } ASSetPropFlags(Array.prototype,"copy" , 1, true); ; zweites_array = erstes_array.copy(); erstes_array.splice(0,2); trace("erstes_array = " + erstes_ [...]
Benutzerbild von Sebastian

Prototype: Number.roundTo
04.11.2004 - 0 Kommentare - Sebastian
Schlagwörter: number, prototype
Zahl aufrunden nach x Number.prototype.roundTo = function(stellen) { var d = Math.pow(10,stellen); return Math.round(this * d) / d; } zahl = 213.545; trace(zahl.roundTo(2)); // 213.55
Benutzerbild von Madokan

Prototype: Array.prototype.arrayToVar
30.10.2004 - 5 Kommentare - Madokan
Schlagwörter: Array, prototype
Array Elemente in Variablen überführen. // Array in Variablen umwandeln Array.prototype.arrayToVar = function(varname) { if (varname == undefined) varname = "variable"; for (var i = 0; i < this.length; i++) { _root; [...]
Benutzerbild von Madokan

Prototype: String.prototype.stringToArray
30.10.2004 - 2 Kommentare - Madokan
Schlagwörter: prototype, String
Zeichenketteninhalt in ein Array überführen. // Zeichenkette in Array - inspired by Sebastian String.prototype.stringToArray = function(trennzeichen) { if (trennzeichen == undefined) trennzeichen = ","; return this.split(trennzeichen) [...]
Benutzerbild von Madokan

Prototype: String.prototype.stringToVar
30.10.2004 - 0 Kommentare - Madokan
Schlagwörter: prototype, String
Zeichenketteninhalte in Variablen ablegen // Zeichenkette in Variablen umwandeln String.prototype.stringToVar = function(varname,trennzeichen) { if (varname == undefined) varname = "variable"; if (trennzeichen == undefined) trennzeichen = ","; [...]
Benutzerbild von umlart

Prototype: Math.precision
20.10.2004 - 1 Kommentar - umlart
Schlagwörter: math, prototype
Wert auf Dezimalstellen runden //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.precision (value, decimalPlaces) //+ //+ returns the given value rounded to specified decimal places //+++++++++++++++++++++++++++++ [...]
Benutzerbild von Kai Jansen

Prototype: getPhoneticPassword
18.10.2004 - 0 Kommentare - Kai Jansen
Schlagwörter: functions, prototype
Phonetisches Passwort generieren function getPhoneticPassword (pwdLen : Number) : String { /* Based on a ColdFusion-Script by Michael Hnat. Translated to ActionScript 2.0 by Kai Jansen. Modified by Kai Jansen. */ // get absolute Number [...]
Benutzerbild von Madokan

Prototype: Movieclip.leseTiefen
23.07.2004 - 1 Kommentar - Madokan
Schlagwörter: Movieclip, prototype
Hiermit können die belegten Tiefen ausgegeben werden // leseTiefen Funktion // - pMax bis zu welcher Tiefe soll analysiert werden // - Gibt die belegten Tiefen aus + MocieClip Namen MovieClip.prototype.leseTiefen = function(pMax) { var liste [...]
Benutzerbild von Sebastian

Prototype: Key.onEnterDown / onEnterUp
19.07.2004 - 2 Kommentare - Sebastian
Schlagwörter: key, prototype
Event Handler für die Enter Taste // onEnter onEnterListener = {}; onEnterListener.onKeyDown = function() { if(Key.getCode() == Key.ENTER) { Key.broadcastMessage("onEnterDown"); } } onEnterListener.onKeyUp = function() { if(Key.get [...]
Benutzerbild von markus_n

Prototype: Key.onEnterDown / onEnterUp v2
15.07.2004 - 0 Kommentare - markus_n
Schlagwörter: asbroadcaster, prototype
Event Handler für die Enter Taste // 'onEnterListener'- Objekt erstellen und als Event-Quelle freigeben: onEnterListener = {}; ASBroadcaster.initialize(onEnterListener); // Methoden u. Eigenschaften als Event-Quelle ueberpruefen: /* ASSetPr [...]
Benutzerbild von Kai Jansen

Prototype: stristr (Original)
15.07.2004 - 2 Kommentare - Kai Jansen
Schlagwörter: prototype, String
Sucht das erste Vorkommenn eins Strings oder eines ASCII Codes RETURN: Restsring String.prototype.stristr = function (needle) { var str = this.toUpperCase(); index = (typeof(needle) == "string") ? str.indexOf(needle.toUpperCase()) : str.indexOf [...]
Benutzerbild von Kai Jansen

Prototype: Array.indexOf
13.07.2004 - 1 Kommentar - Kai Jansen
Schlagwörter: Array, prototype
Gibt den ersten vorkommenden Index in einem Array zurück Array.prototype.indexOf = function (s) { var index = -1; for (var i in this) { if (this == s) { index = i; } } index = (isNaN(index)) ? index : Number(index); return inde [...]
Benutzerbild von Sandman_2k

Prototype: String.nreplace
19.06.2004 - 0 Kommentare - Sandman_2k
Schlagwörter: prototype, String
Das n-te Zeichen eines Strings wird durch übergebenes Zeichen ersetzt String.prototype.nreplace = function(pos, repchar) { return (this.substring(0, pos-1).concat(repchar, this.substring(pos, this.length))); }; ASSetPropFlags(String.prototyp [...]
abgemeldeter Benutzer
Prototype: duplicate TextField
08.06.2004 - 0 Kommentare - .cYe
Schlagwörter: duplicate, prototype, textfield
TextField.duplicate() TextField.prototype.duplicate = function (instanceName:String, depth:Number) { this._parent.createTextField(instanceName, depth, this._x, this._y, this._width, this._height); this._parent.setNewTextFormat(this.getTextFo [...]
abgemeldeter Benutzer
Prototype: Array.addDim & Array.delDim
25.05.2004 - 0 Kommentare - .cYe
Schlagwörter: Array, prototype
Helferchen zur Arbeit mit mehrdimensionalen Arrays. // addDim fuegt ein oder mehrere Werte in einer neuen Dimension eines Arrays hinzu Array.prototype.addDim = function() { var arg, std = (arguments.length==1)? arguments : 0; for(var [...]
Benutzerbild von MoD

Prototype: removeTags
30.04.2004 - 0 Kommentare - MoD
Schlagwörter: prototype, String
Entfernt alle Tags aus einem String (XML-Variante) //FLASH5-VERSION string.prototype.removeTags=function() { var stringAsXML=new XML(this); var ACTUALnode=stringAsXML.firstChild; var DOstepNum=0; var DONEstep; var DONEsearching=false; [...]
Benutzerbild von ToBSn

Prototype: Color.FadeBrightness
15.04.2004 - 0 Kommentare - ToBSn
Schlagwörter: color, prototype
erzeugt einen \"glowartigen\" Fade Color.prototype.changebrightness = function($brightness) { var $transform = this.getTransform(); with ($transform) { rb = gb=bb=$brightness; } this.setTransform($transform); }; MovieClip.prototype.fad [...]
Benutzerbild von Kai Jansen

Prototype: setSectionPoints
06.04.2004 - 0 Kommentare - Kai Jansen
Schlagwörter: math, prototype
Tausender Punkte setzen Math.setSectionPoints = function (z) { var z1 = String(z).split("."); if (z1.length <= 3) return z1.join(","); var i_array = z1.split("").reverse(); var o_array = new Array(); o_array.push("," + z1); var count = [...]
Benutzerbild von Kai Jansen

Prototype: limitTextLength
10.03.2004 - 0 Kommentare - Kai Jansen
Schlagwörter: prototype, textfield
Zu langen Text mit \"...\" begrenzen TextField.prototype.limitTextLength = function (myWidth) { this.autoSize = "left"; var myFormat = this.getTextFormat(); var myText = this.text; w = this.textWidth; trace (w); while (w > myWidth) { [...]
Benutzerbild von ToBSn

Prototype: MovieClip.colorFade
03.03.2004 - 3 Kommentare - ToBSn
Schlagwörter: color, prototype
MCs stufenloser Colorfade MovieClip.prototype.colorFade = function(newHEX, speed) { var myColor = new Color(this); var cRGB = myColor.getRGB(); var cHEX = cRGB.toString(16); this.onEnterFrame = function() { if (cHEX<>ne [...]
Benutzerbild von Madokan

Prototype: AddZeros
26.02.2004 - 1 Kommentar - Madokan
Schlagwörter: number, prototype
Nullen hinzufügen für Punktestände Number.prototype.addZeros = function(p) { return new Array(p - length(this) + 1).join('0') + this; }; // oder als Klasse: Score = function (points) { this.points = points; }; Sco [...]
Benutzerbild von Madokan

Prototype: Array.unique
04.02.2004 - 2 Kommentare - Madokan
Schlagwörter: Array, prototype
Entfernt doppelte Einträge aus einem Array Array.prototype.unique = function() { for (var i = 0; i < this.length; i++) { for (var j = (i + 1); j <= this.length; j++) { if (this) { this.splice(j, 1); } } } }; // Verwenden [...]
Benutzerbild von ToBSn

Prototype: MovieClip.Typewriter
01.02.2004 - 0 Kommentare - ToBSn
Schlagwörter: prototype, textfield
Typewriterprototype typeForm = new TextFormat(); typeForm.color = 0xBABABA; typeForm.size = 20; typeForm.font = "euerEMBEDFONT"; // MovieClip.prototype.typeW = function(mcName, Tiefe, TposX, TposY, TposH, TposW, toType) { var i = 0; var j [...]
Benutzerbild von Madokan

Prototype: String.replace
23.10.2003 - 0 Kommentare - Madokan
Schlagwörter: prototype, String
Suchen und Ersetzen String.prototype.replace = function(s, z) { return unescape(escape(this).split(s).join(z)); }; ASSetPropFlags(String.prototype, "replace", 1, true); // Verwendung trace(inhalt = eingabe_txt.text.replace("%0D", "<b [...]
Benutzerbild von hockeystardg#88

Prototype: String.prestr
14.10.2003 - 0 Kommentare - hockeystardg#88
Schlagwörter: prototype, String
Sucht erstes Vorkommen des Suchstring und liefert alles was dvor steht String.prototype.prestr = function(s) { if (this.toLowerCase().indexOf(s.toLowerCase()) == -1) { return false; } else { return this.substr(0,this.toLowerCase().indexOf [...]
Benutzerbild von umlart

Prototype: Math.vectorFaceNormal
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Flächennormale errechnen //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorFaceNormal (Point1, Point2, Point3) //+ //+ returns the face normal vector of a plane (or polygon, or face) //+ described by three [...]
Benutzerbild von umlart

Prototype: Math.vectorCross
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Kreuzprodukt zweier Vektoren //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorCross (vector1, vector2) //+ //+ returns the cross product of the given vectors, that´s another //+ vector perpendicular to bot [...]
Benutzerbild von umlart

Prototype: Math.vectorDistance
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Distanz zwischen 2 Punkten berechnen //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorDistance (startPoint, endPoint) //+ //+ returns the distance between two points //++++++++++++++++++++++++++++++++++++++ [...]
Benutzerbild von umlart

Prototype: Math.vectorAngle
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Winkel zwischen Vektoren errechnen //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorAngle (vector1, vector2) //+ //+ returns the angle between two vectors //+++++++++++++++++++++++++++++++++++++++++++++++++ [...]
Benutzerbild von umlart

Prototype: Math.vectorDot
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Skalarprodukt zweier Vektoren //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorDot (vector1, vector2) //+ //+ returns the dot product of the given vectors - in case of unit //+ vectors that´s actually the [...]
Benutzerbild von umlart

Prototype: Math.vectorNormalize
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Vektor normalisieren //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorNormalize (vector) //+ //+ returns the normalized vector (that is, a vector of 1 unit length //+ pointing in the direction of the given [...]
Benutzerbild von umlart

Prototype: Math.vectorLength
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Vektorlänge berechnen //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorLength (vector) //+ //+ returns the length of the vector //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Math [...]
Benutzerbild von umlart

Prototype: Math.vectorDivide
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Vektordivision //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorDivide (vector, factor) //+ //+ returns the vector divided by factor (that is, scales the //+ length of the vector) //+++++++++++++++++++++++ [...]
Benutzerbild von umlart

Prototype: Math.vectorMultiply
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Vektormultiplikation //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorMultiply (vector, factor) //+ //+ returns the vector multiplied by factor (that is, scales the //+ length of the vector) //++++++++++++ [...]
Benutzerbild von umlart

Prototype: Math.vectorSubtract
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Vektorsubtraktion //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorSubtract (startPoint, endPoint) //+ //+ returns the vector (or path) from start point to end point //++++++++++++++++++++++++++++++++++++++ [...]
Benutzerbild von umlart

Prototype: Math.vectorAdd
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Vektoraddition /+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.vectorAdd (startPoint, vector) //+ //+ adds the vector to the start point and returns the resulting //+ end point (or target point) //++++++++++++++ [...]
Benutzerbild von umlart

Prototype: Math.pow3
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Wert hoch drei (auch in Flash5) //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.pow3 (value) //+ //+ returns the 3rd power of given value like Math.pow(value, 3), but //+ handles value<=0 in Flash5 where built-i [...]
Benutzerbild von umlart

Prototype: Math.pow2
08.10.2003 - 0 Kommentare - umlart
Schlagwörter: math, prototype
Wert hoch zwei (auch in Flash5) //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+ Math.pow2 (value) //+ //+ returns the square of given value like Math.pow(value, 2), but //+ handles value<=0 in Flash5 where built-in f [...]
Benutzerbild von X|ngu

Prototype: Math.phi
06.10.2003 - 0 Kommentare - X|ngu
Schlagwörter: math, prototype
goldenen Schnitt berechnen Math.phi = function(sum){ var fak = (1 + Math.sqrt(5)) / 2; var b = sum / fak ; var a = b / fak; var arr = ; return arr; } //gibt die beiden Teile eines Wertes im Verhältnis des goldenen Schnittes //zur [...]
Benutzerbild von Madokan

Prototype: Movieclip.atmosphere
05.10.2003 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Atmosphere - Effekt MovieClip.prototype.atmosphere = function(pObj, pAnzahl, pBreite, pHoehe) { for (var i = 0; i<=pAnzahl; i++) { this.attachMovie(pObj, "flocke"+i, i); this._x = Math.round(Math.random()*pBreite); this._y = Math.round(M [...]
Benutzerbild von Madokan

Prototype: Movieclip.Schnee
05.10.2003 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Schnee-Effekt MovieClip.prototype.schnee = function(pObj,pAnzahl, pBreite, pHoehe) { for (var i = 0; i<=pAnzahl; i++) { this.attachMovie(pObj, "flocke"+i, i); this.skal = 50+(Math.random()*100); this.alpha = 20+(Math.random()*50); thi [...]
Benutzerbild von Madokan

Prototype: MovieClip.setMatrix
27.09.2003 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Feldmatrix Effekt Prototype MovieClip.prototype.setMatrix = function (pClip, pReihen, pSpalte, pDim, pDist, pFarbe, pAlpha, pAbstand, pMax, pMin, pMult, pFraktion) { var tiefe; for (var i = 0; i<pReihen; i++) { for (var j = 0; j<pSpalte; j++ [...]
Benutzerbild von Sebastian

Prototype: Array.maxLength
26.09.2003 - 0 Kommentare - Sebastian
Schlagwörter: Array, prototype
Länge des Arrays auf nr kürzen Array.prototype.maxLength = function(i) { if(i>0 && this.length>i) this.pop(), this.maxLength(i); else if(i<0 && this.length>i*-1) this.shift(), this.maxLength(i); } ; ary.maxLength(4); trace(ary); // a,b,c [...]
Benutzerbild von Sebastian

Prototype: SharedObject.destroy
03.09.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, sharedobject
SharedObject löschen // http://www.flashguru.co.uk SharedObject.destroy = function(name){ var so = SharedObject.getLocal(name); for(var i in so.data){ delete so.data; } so.flush(); }
Benutzerbild von Madokan

Prototype: Array.findRemove
02.09.2003 - 1 Kommentar - Madokan
Schlagwörter: Array, prototype
Eintrag suchen und entfernen! Array.prototype.findRemove = function(removeEntry) { return this.toString().split(removeEntry + ",").join("").split(","); }; // Verwenden liste = ; liste = liste.findRemove("Matze"); trace(liste [...]
Benutzerbild von petalustik

Prototype: attachAbove / attachUnder
30.07.2003 - 0 Kommentare - petalustik
Schlagwörter: Movieclip, prototype
Tiefenmanagement der einfachen Art /* * * COPYRIGHT MAX KLATTE, NUR FÜR NICHT KOMMERZIELLE NUTZUNG! (ansonten rücksprache); * * Diese Funtkion erleichtert ein "Tiefenmanegment" ohne den gebrauch von leveln. * So wird auch Beispielsweise das [...]
Benutzerbild von Sebastian

Prototype: MovieClip.onDoubleClick
24.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: Movieclip, prototype
Event Handler - Doppelklick MovieClip.prototype.addProperty("onDoubleClick",function() { return this.$onDoubleClick; },function(f) { this.__proto__ = DoubleClick.prototype; this.$onDoubleClick = f; ASSetPropFlags(this,,1,true); }); [...]
Benutzerbild von Madokan

Prototype: Key.onShiftDown / onShiftUp
23.07.2003 - 10 Kommentare - Madokan
Schlagwörter: key, prototype
Globaler Event Handler für die Shift-Taste // onSHIFTDown/Up - Inspired by Sebastian // Durch das _global Objekt wird das ganze Zeitleisten // unabhängig und zu einem Konstanten Event Handler // Hinweis: Lässt sich beliebig auf weitere Taste [...]
Benutzerbild von Madokan

Prototype: Movieclip.simpleCircle
20.07.2003 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Einfacher Kreis mit lineTo() // Der Trick funtzt prima das lineTo() zu missbrauchen. // Die Untergrenze für die Verschiebung liegt bei // 0.14999999999999999. MovieClip.prototype.simpleCircle = function(pobj, ptiefe, pX, pY, pDicke, pFarbe, pDe [...]
Benutzerbild von Sebastian

Prototype: String.removeHTML
19.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Entfernt HTML Tags aus einem String String.prototype.removeHTML = function() { var temp = "", s; while((s=this.indexOf("<"))!=-1) { temp += this.substr(0,s); this = this.substr(this.indexOf(">")+1); } return temp+this; }; ASSetP [...]
Benutzerbild von Kai Jansen

Prototype: String.trim
18.07.2003 - 0 Kommentare - Kai Jansen
Schlagwörter: prototype, String
Schneidet Leerzeichen und Steuerzeichen vor und hinter einem String ab. String.prototype.trim = function() { for (var i = 0; this.charCodeAt(i)<33; i++); for (var j = this.length-1; this.charCodeAt(j)<33; j--); return this.substring(i, j+1); [...]
Benutzerbild von Kai Jansen

Prototype: Array.lastIndexOf()
18.07.2003 - 0 Kommentare - Kai Jansen
Schlagwörter: Array, prototype
Gibt den letzten vorkommenden Index aus einem Array zurück. Array.prototype.lastIndexOf = function (s) { var index = -1; for (var i in this) { if (this == s) { index = i; break; } } index = (isNaN(index)) ? index : Number(ind [...]
Benutzerbild von Sebastian

Prototype: Mouse.onDoubleClick
17.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: mouse, prototype
Event Handler - Doppelklick dCListener = {}; dCListener.onMouseDown = function() {(t = getTimer()) < $a+250 ? Mouse.broadcastMessage("onDoubleClick") : $a = t;} Mouse.addListener(dCListener); ASBroadcaster.initialize(dCListener); ASSetPropFlag [...]
Benutzerbild von max0matic

Prototype: transform
13.07.2003 - 1 Kommentar - max0matic
Schlagwörter: Movieclip, prototype
Eventgesteuerte Animation MovieClip.prototype.transform = function( $tobj , $ref) { //lokal ablegen this.$tobj = $tobj; this.$ref = $ref; //transformieren this.onEnterFrame = function() { var count = 0; for (var prop in this.$tobj) [...]
Benutzerbild von Madokan

Prototype: Movieclip.totalAction
12.07.2003 - 0 Kommentare - Madokan
Schlagwörter: Movieclip, prototype
Sämtliche MovieClips auf einmal Steuern Movieclip.prototype.totalAction = function(op,val) { this(val); for (var i in this) { if (typeof (this) == "movieclip") { this.totalAction(op,val); } } }; // Verwenden this.totalAction [...]
Benutzerbild von Sebastian

Prototype: String.wordwrap
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Bricht die Zeilen nach einer bestimmten Anzahl mittels angegebenen Zeichen um String.prototype.wordwrap = function(nr,br,cut) { var i, l, nr=(!nr ? 75 : nr), temp="", laenge=Math.floor(this.length/nr), br=(br==undefined ? "\n" : br); for(i=0;i< [...]
Benutzerbild von Sebastian

Prototype: String.ucfirst
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Setzt das erste Zeichen eines Strings als Großbuchstabe um String.prototype.ucfirst = function() { return this.charAt(0).toUpperCase()+this.substr(1); } ASSetPropFlags(String.prototype,"ucfirst",1,true);
Benutzerbild von Sebastian

Prototype: String.strrchr
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Sucht letztes Vorkommen des gesuchten Zeichens und liefert den Reststring String.prototype.strrchr = function(s) { var temp; if((temp = this.toLowerCase().lastIndexOf(s.toLowerCase())) == -1) return false; return this.substr(temp); } ASSetP [...]
Benutzerbild von Sebastian

Prototype: String.stristr
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Sucht erstes Vorkommen des Suchstrings und liefert den Reststring // Wie String.strstr, aber ohne Rücksicht auf Groß- bzw. Kleinschreibung // String.strstr -> http://www.flashhilfe.de/go/prototype/lesen&id=24&kat=21 String.prototype.stristr [...]
Benutzerbild von Sebastian

Prototype: String.strstr
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Sucht erstes Vorkommen des Suchstrings und liefert den Reststring String.prototype.strstr = function(s) { var temp if((temp = this.indexOf(s)) == -1) return false; return this.substr(temp); } ASSetPropFlags(String.prototype,"strstr", [...]
Benutzerbild von Sebastian

Prototype: String.repeat
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Wiederholt eine String-Ausgabe // Inspired by Madokan // http://www.flashhilfe.de/go/prototype/lesen&kat=16&seite=0&id=11 String.prototype.repeat = function(nr) { return new Array(nr+1).join(this); } ASSetPropFlags(String.prototype,"repeat [...]
Benutzerbild von Sebastian

Prototype: String.reverse
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Liefert einen String in umgekehrter Reihenfolge String.prototype.reverse = function() { return this.split("").reverse().join(""); } ASSetPropFlags(String.prototype,"reverse",1,true);
Benutzerbild von Sebastian

Prototype: String.uniqid
09.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Erstellt eine eindeutige ID Array.prototype.find = function(eingabe) { return (this.toString().split(eingabe).length > 1); } String.uniqid = function(nr) { var str = "", b = ""; for(var i=0;i<nr;i++) { b = random(36).toString(36); [...]
Benutzerbild von Sebastian

Prototype: Array.find
08.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: Array, prototype
Findet Eintrag im Array und gibt true zurück Array.prototype.find = function(eingabe) { for(var i in this) if(this === eingabe) return true; return false; } ASSetPropFlags(Array.prototype,"find",1,true); ; trace(test_ary.find("Fr 02.0 [...]
Benutzerbild von Sebastian

Prototype: String.replace
07.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Suchen und ersetzen // ######################### // Für Flash MX: // ######################### String.prototype.replace = function (s, j) { return this.split(s).join(j); } ASSetPropFlags(String.prototype,"replace",1,true); // #### [...]
Benutzerbild von Sebastian

Prototype: String.toArray
07.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
Text in Array umwandeln // Inspired by Madokan String.prototype.toArray = function() { return this.split(""); }; ASSetPropFlags(String.prototype,"toArray",1,true); // Zuweisung text = "flashhilfe.de"; liste = text.toArray(); [...]
Benutzerbild von Sebastian

Prototype: TextField.checkEmail
07.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, textfield
Email Adresse überprüfen /*#####################################*/ /* Email - Check | Flash MX | 2003 */ /* Sebastian Wichmann */ /* Michael Holl (Holly) */ /* http://www.flashhilfe.de */ / [...]
Benutzerbild von Sebastian

Prototype: TextFormat.setFont
06.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, textformat
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(( [...]
Benutzerbild von Sebastian

Prototype: String.shuffle
03.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
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; } [...]
Benutzerbild von Madokan

Prototype: Math.zufallZwischen
02.07.2003 - 0 Kommentare - Madokan
Schlagwörter: math, prototype
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));
Benutzerbild von Sebastian

Prototype: String.dateToTimestamp
02.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: prototype, String
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 [...]
Benutzerbild von Sebastian

Prototype: Array.rand
01.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: Array, prototype
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< [...]
Benutzerbild von Sebastian

Prototype: Array.shuffle
01.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: Array, prototype
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 [...]
Benutzerbild von Sebastian

Prototype: delete_all
01.07.2003 - 0 Kommentare - Sebastian
Schlagwörter: functions, prototype
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 _ [...]
Benutzerbild von max0matic

Prototype: XMLSA 1.4
29.06.2003 - 0 Kommentare - max0matic
Schlagwörter: prototype, xml
XML Simple Array hilft auf einfache und intutive Weise. /*--------------------------------------------------------------------------- XMLSA for Flash MX v1.4 ----------------------------------------------------------------------------- Created [...]
Benutzerbild von Madokan

Prototype: Button.useHandCursor
28.06.2003 - 0 Kommentare - Madokan
Schlagwörter: button, prototype
Sämtliche Cursorwechsel für Schaltflächen werden deaktiviert
Benutzerbild von Sebastian

Prototype: Array_unique();
25.06.2003 - 0 Kommentare - Sebastian
Schlagwörter: Array, prototype
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 [...]
Benutzerbild von Sebastian

PHP Daten in Flash laden (LoadVars-Object etc.)
30.05.2003 - 18 Kommentare - Sebastian
Im // Flash 5 Variante onClipEvent(load) { // Daten senden this.loadVariables("datei.php?cache=" + (new Date().getTime())); } onClipEvent(data) { _root.textfeld_1 = this.inhalt_1; // Variable aus dem PHP Script einem Textfeld zuweise [...]

Hast Du einen interessanten Adobe Flash / Flex / AIR Tipp, Tutorial
oder Code Snippets den Du mit anderen teilen möchtest?

Flash Tipp schreiben
Partner Webseiten: art-and-law.de  Mediengestalter.info   phpwelt.de   Scubacube.de  
Haftungsausschluss   Datenschutzerklärung   Impressum
© 1999-2024 Sebastian Wichmann - Flashhilfe.de