.Dari pada libur kuliah boring nganggur, mending posting aja deh... ini cara membuat efek di flash dengan action script 2. buka flas - pilih flash action script 2 dan copy paste script dibawah ini, di frame pertama dan lihat hasilnya magstab gan boleh dicoba deh...
nomor = 1000;
interv = setInterval(function () {
buatbintang();
}, 20);
function buatbintang() {
nomor++;
if (nomor>2000) {
nomor = 1000;
}
_root.createEmptyMovieClip("bintang"+nomor, nomor);
with (_root["bintang"+nomor]) {
lineStyle(2, 0x000000, 100);
lineTo(0.2, 0);
_x = Stage.width/2;
_y = Stage.height/2;
_alpha = 0;
_rotation = random(360);
}
_root["bintang"+nomor].kecepatan = random(6/2)+6/2;
_root["bintang"+nomor].onEnterFrame = function() {
this.kecepatan *= 1+(20/500);
this._width *= 1+(20/2500);
this._height *= 1+(20/2500);
this._alpha += 3;
if (this._rotation>180) {
this._y += (this.kecepatan*Math.cos(Math.PI/180*this._rotation));
this._x -= (this.kecepatan*Math.sin(Math.PI/180*this._rotation));
} else {
this._y -= (this.kecepatan*Math.cos(Math.PI/180*this._rotation));
this._x += (this.kecepatan*Math.sin(Math.PI/180*this._rotation));
}
if (this._x<0-this._width || this._x>Stage.width+this._width || _y>Stage.height+this._width || _y<-this._width) {
this.removeMovieClip();
}
};
}
interv = setInterval(function () {
buatbintang();
}, 20);
function buatbintang() {
nomor++;
if (nomor>2000) {
nomor = 1000;
}
_root.createEmptyMovieClip("bintang"+nomor, nomor);
with (_root["bintang"+nomor]) {
lineStyle(2, 0x000000, 100);
lineTo(0.2, 0);
_x = Stage.width/2;
_y = Stage.height/2;
_alpha = 0;
_rotation = random(360);
}
_root["bintang"+nomor].kecepatan = random(6/2)+6/2;
_root["bintang"+nomor].onEnterFrame = function() {
this.kecepatan *= 1+(20/500);
this._width *= 1+(20/2500);
this._height *= 1+(20/2500);
this._alpha += 3;
if (this._rotation>180) {
this._y += (this.kecepatan*Math.cos(Math.PI/180*this._rotation));
this._x -= (this.kecepatan*Math.sin(Math.PI/180*this._rotation));
} else {
this._y -= (this.kecepatan*Math.cos(Math.PI/180*this._rotation));
this._x += (this.kecepatan*Math.sin(Math.PI/180*this._rotation));
}
if (this._x<0-this._width || this._x>Stage.width+this._width || _y>Stage.height+this._width || _y<-this._width) {
this.removeMovieClip();
}
};
}
Seemoga bermanfaat ya gan...
.::Artikel Menarik Lainnya::.
Komentar ini telah dihapus oleh pengarang.
lek kooment ojo memicu adrenalin... hahaha
ada apa masbro..??