Mit Strömung:
Variante zwei:PHP-Code:function setzeBlasen(obj, tiefe, xPos, yPos, anzahl, zHoehe, zBreite, Hoehe, Breite, Stroemung) {
this.createEmptyMovieClip(obj,tiefe);
this[obj]._x = xPos;
this[obj]._y = yPos;
for (var i = 1; i <= anzahl; i++) {
this[obj].attachMovie("blase", "blup" + i, tiefe + i);
this[obj]["blup" + i].geschw = random(7) + 5;
this[obj]["blup" + i].wert = random(4);
this[obj]["blup" + i].richtung = -1;
this[obj]["blup" + i].ZS = random(50) + 10;
this[obj]["blup" + i]._xscale = this[obj]["blup" + i].ZS;
this[obj]["blup" + i]._yscale = this[obj]["blup" + i].ZS;
this[obj]["blup" + i]._y = random(zHoehe);
this[obj]["blup" + i]._x = random(zBreite);
this[obj]["blup" + i].onEnterFrame = function() {
winkel+=.635
this._y -= this.geschw;
this._x -= this.wert;
this.wert=Math.sin(winkel)*random( 8 )+Stroemung
if (this._y <= 0) {
this._y = Hoehe;
this.geschw = random(7) + 5;
this.ZS = random(50) + 10;
}
if (this._x <= 0) {
this._x = Breite - this._width;
}
if (this._x >= Breite) {
this._x = 0 + this._width;
}
};
}
}
setzeBlasen("raum", 1, 0, 0, 30, 500, 550, 400, 550, -6);
PHP-Code:function setzeBlasen(obj, tiefe, xPos, yPos, anzahl, zHoehe, zBreite, Hoehe, Breite) {
this.createEmptyMovieClip(obj,tiefe);
this[obj]._x = xPos;
this[obj]._y = yPos;
for (var i = 1; i <= anzahl; i++) {
this[obj].attachMovie("blase", "blump" + i, tiefe + i);
this[obj]["blump" + i].geschw = random(7) + 5;
this[obj]["blump" + i].wert = random(4);
this[obj]["blump" + i].richtung = -1;
this[obj]["blump" + i].ZS = random(50) + 10;
this[obj]["blump" + i]._xscale = this[obj]["blump" + i].ZS;
this[obj]["blump" + i]._yscale = this[obj]["blump" + i].ZS;
this[obj]["blump" + i]._y = random(zHoehe);
this[obj]["blump" + i]._x = random(zBreite);
this[obj]["blump" + i].onEnterFrame = function() {
this._y -= this.geschw;
this._x -= this.wert;
this.wert += this.richtung;
if (this._y <= 0) {
this._y = Hoehe;
this.wert = random(4);
this.geschw = random(7) + 5;
this.ZS = random(50) + 10;
}
if (this._x <= 0) {
this._x = Breite - this._width;
}
if (this._x >= Breite) {
this._x = 0 + this._width;
}
if (this.wert < -random(3)) {
this.richtung = +1;
}
if (this.wert > random(3)) {
this.richtung = -1;
}
};
}
}
setzeBlasen("raum", 1, 0, 0, 30, 400, 550, 400, 550);

LinkBack URL
About LinkBacks

Zitieren
