MJAInc
Mitglied
Hi ich mal wieder.
Ich habe mir ein Buch gekauft und da war das drin.
Lieder eght es nur wie man sieht ueber ein mouseklick. Kann man das so umbauen das die Punkte ueber eine Randomfunktion gesetzt werden
Ich habe mir ein Buch gekauft und da war das drin.
PHP:
function onMouseDown(){
var zufall = (random(50) + 20);
var i = 0;
while(i < zufall){
var zufallswinkel = random(360) * 0.017453292519943295;
var zufallsfaktor = (random(4) + 1);
var init_obj = {_x:((_xmouse + random(3)) - 1),
_y:((_ymouse + random(3)) - 1),
vx:Math.cos(zufallswinkel) * zufallsfaktor,
vy:(-2 + Math.sin(zufallswinkel) * zufallsfaktor),
onEnterFrame:setzeBewegung,
g:0};
var feuerstern = sterne.attachMovie(("stern" + random(3)), ("stern" + i), sterne.getNextHighestDepth(), init_obj);
feuerstern.cacheAsBitmap = true;
feuerstern.x = this._xmouse;
feuerstern.y = this._ymouse;
feuerstern.blendMode = "add";
i++;
}
}
function setzeBewegung(){
this.vx *= 0.99;
this._x += this.vx;
this._y += (this.vy + this.g);
this.g += 0.2;
if(this._y > 400){
this.removeMovieClip();
}
}
var matrix = new Array();
matrix = matrix.concat([0.99, 0, 0, 0, 0]);
matrix = matrix.concat([0, 0.97, 0, 0, 0]);
matrix = matrix.concat([0, 0, 0.98, 0, 0]);
matrix = matrix.concat([0, 0, 0, 1, 0]);
var darken = new flash.filters.ColorMatrixFilter(matrix);
var bmpdaten = new flash.display.BitmapData(Stage.width, Stage.height, false, 0);
this.createEmptyMovieClip("bild", 1);
bild.attachBitmap(bmpdaten, 0, "auto", true);
bild.cacheAsBitmap = true;
this.createEmptyMovieClip("sterne", 11);
var blur = new flash.filters.BlurFilter(5, 5, 1);
bild.filters = [blur];
sterne._visible = false;
onEnterFrame = function () {
bmpdaten.applyFilter(bmpdaten, new flash.geom.Rectangle(0, 0, 550, 400), new flash.geom.Point(0, 0), darken);
bmpdaten.draw(sterne);
bmpdaten.draw(bild);
};
logo_mc.swapDepths(200);
Lieder eght es nur wie man sieht ueber ein mouseklick. Kann man das so umbauen das die Punkte ueber eine Randomfunktion gesetzt werden