 |
| Hinweise |
Willkommen im TP-Hilfe-Forum!Dies ist ein Forum zu den Themen Photoshop, Dreamweaver, Flash, Selbständigkeit und mehr, in dem Du Hilfe, Anleitung oder eine Lösung zu Deinen Problemen erhältst. Aktuell bist Du in unseren Foren als Gast mit reinen Leserechten unterwegs. Wenn Du Dich registrierst, kannst Du eigene Themen verfassen, deine Frage stellen und privat mit anderen TPlern kommunizieren. Weitere Foren werden zugänglich, und Du wirst – falls gewünscht – per Mail über neue Beiträge informiert. Die Registrierung ist schnell und kostenlos. Sollten bei der Registrierung Fragen auftauchen, reicht ein Klick in unsere Hilfe - Häufig gestellte Fragen oder eine kurze Mitteilung an das Support-Team. Viel Spaß bei Traum-Projekt.com |
01.03.2004, 19:02
|
#1
|
|
TP-Moderator
Registriert seit: Oct 2002
Ort: Berlin/Germany
|
Feldmatrix Formen
Hi Folks,
Hier was zum rum spielen - vorsicht wer zu viele Formen setzt der setzt der Performance kräftigt zu hierbei wäre ein _quality = "LOW" zu empfehlen.
Version Quadrat
PHP-Code:
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++) {
this[pClip] = this.createEmptyMovieClip(pClip+j+"_"+i, tiefe++);
with (this[pClip]) {
beginFill(pFarbe, pAlpha);
moveTo(-pDim, -pDim);
lineTo(pDim, -pDim);
lineTo(pDim, pDim);
lineTo(-pDim, pDim);
lineTo(-pDim, -pDim);
_x = Math.round(i*((2*pDim)+pDist)+Stage.width/2-((pReihen-1)*((2*pDim)+pDist)/2));
_y = Math.round(j*((2*pDim)+pDist)+Stage.height/2-((pSpalte-1)*((2*pDim)+pDist)/2));
}
this[pClip].onEnterFrame = function() {
this.abstX = this._x-_root._xmouse;
this.abstY = this._y-_root._ymouse;
this.abstand = Math.sqrt((this.abstX*this.abstX)+(this.abstY*this.abstY));
if (this.abstand<pAbstand) {
this.dimX = pMax-this.abstand;
this.dimY = pMax-this.abstand;
} else {
this.dimX = pMin;
this.dimY = pMin;
}
this.skalX = ((this.dimX-this._xscale)*pMult)+(this.skalX*pFraktion);
this.skalY = ((this.dimY-this._yscale)*pMult)+(this.skalY*pFraktion);
this._xscale += this.skalX;
this._yscale += this.skalY;
};
}
}
}
this.setMatrix("feld", 10, 10, 10, 10, 0xffff00, 25, 200, 250, 100 ,.36, .75);
this.createEmptyMovieClip("mc",100);
this.mc.setMatrix("feld", 10, 10, 10, 10, 0xff0000, 25, 200, 250, 100 ,.36, .90);
-----
Version Kreise (gefüllt)
PHP-Code:
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++) {
this[pClip] = this.createEmptyMovieClip(pClip+j+"_"+i, tiefe++);
with (this[pClip]) {
moveTo(0,-1);
lineStyle(20, pFarbe, pAlpha);
lineTo(0, 0);
_x = Math.round(i*((2*pDim)+pDist)+Stage.width/2-((pReihen-1)*((2*pDim)+pDist)/2));
_y = Math.round(j*((2*pDim)+pDist)+Stage.height/2-((pSpalte-1)*((2*pDim)+pDist)/2));
}
this[pClip].onEnterFrame = function() {
this.abstX = this._x-_root._xmouse;
this.abstY = this._y-_root._ymouse;
this.abstand = Math.sqrt((this.abstX*this.abstX)+(this.abstY*this.abstY));
if (this.abstand<pAbstand) {
this.dimX = pMax-this.abstand;
this.dimY = pMax-this.abstand;
} else {
this.dimX = pMin;
this.dimY = pMin;
}
this.skalX = ((this.dimX-this._xscale)*pMult)+(this.skalX*pFraktion);
this.skalY = ((this.dimY-this._yscale)*pMult)+(this.skalY*pFraktion);
this._xscale += this.skalX;
this._yscale += this.skalY;
};
}
}
}
this.setMatrix("feld", 10, 10, 10, 10, 0xffff00, 25, 200, 250, 100 ,.36, .75);
this.createEmptyMovieClip("mc",100);
this.mc.setMatrix("feld", 10, 10, 10, 10, 0xff0000, 25, 200, 250, 100 ,.36, .90);
-----
Version Kreis (Umriss)
PHP-Code:
MovieClip.prototype.setMatrix = function (pClip, pReihen, pSpalte, pDim, pDist, pFarbe, pAlpha, pAbstand, pMax, pMin, pMult, pFraktion,pSchritte) {
var tiefe;
for (var i = 0; i<pReihen; i++) {
for (var j = 0; j<pSpalte; j++) {
this[pClip] = this.createEmptyMovieClip(pClip+j+"_"+i, tiefe++);
with (this[pClip]) {
moveTo(pDim, 0);
lineStyle(0.1, pFarbe, pAlpha);
for (var k=0; k<=45; k++) {
radiant = k*pSchritte/180*Math.PI;
pX = Math.cos(radiant)*pDim;
pY = Math.sin(radiant)*pDim;
lineTo(pX, pY);
}
_x = Math.round(i*((2*pDim)+pDist)+Stage.width/2-((pReihen-1)*((2*pDim)+pDist)/2));
_y = Math.round(j*((2*pDim)+pDist)+Stage.height/2-((pSpalte-1)*((2*pDim)+pDist)/2));
}
this[pClip].onEnterFrame = function() {
this.abstX = this._x-_root._xmouse;
this.abstY = this._y-_root._ymouse;
this.abstand = Math.sqrt((this.abstX*this.abstX)+(this.abstY*this.abstY));
if (this.abstand<pAbstand) {
this.dimX = pMax-this.abstand;
this.dimY = pMax-this.abstand;
} else {
this.dimX = pMin;
this.dimY = pMin;
}
this.skalX = ((this.dimX-this._xscale)*pMult)+(this.skalX*pFraktion);
this.skalY = ((this.dimY-this._yscale)*pMult)+(this.skalY*pFraktion);
this._xscale += this.skalX;
this._yscale += this.skalY;
};
}
}
}
// Kreise
this.setMatrix("feld", 5, 5, 10, 10, 0x0000ff, 25, 200, 250, 100 ,.36, .75, 8);
this.createEmptyMovieClip("mc",100);
this.mc.setMatrix("feld", 5, 5, 10, 10, 0xff0000, 25, 200, 250, 100 ,.36, .90, 8);
Sterne
PHP-Code:
// Sterne
this.setMatrix("feld", 5, 5, 10, 10, 0x0000ff, 25, 200, 250, 100 ,.36, .75, 100);
this.createEmptyMovieClip("mc",100);
this.mc.setMatrix("feld", 5, 5, 10, 10, 0xff0000, 25, 200, 250, 100 ,.36, .90, 100);
Polygone
PHP-Code:
this.setMatrix("feld", 5, 5, 10, 10, 0x0000ff, 25, 200, 250, 100 ,.36, .75, 300);
this.createEmptyMovieClip("mc",100);
this.mc.setMatrix("feld", 5, 5, 10, 10, 0xff0000, 25, 200, 250, 100 ,.36, .90, 300);
Viel Spass - be inspired!
Download wie immer unter:
http://www.flashstar.de/tutlist/
Liebe Grüsse
Matze K.
Geändert von Madokan (02.03.2004 um 12:43 Uhr).
|
|
|
|
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
|
|
|
| Themen-Optionen |
Thema durchsuchen |
|
|
|
| Thema bewerten |
|
|
Forumregeln
|
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.
HTML-Code ist aus.
|
|
|
Alle Zeitangaben in WEZ +2. Es ist jetzt 20:29 Uhr.
|
 |