Chào mừng quý vị đến với Cùng nhau chia sẻ của Hoàng Hữu Cánh.
code mưa
_root.createEmptyMovieClip("holder", this.getNextHighestDepth());
holder.maxdrops = 600;
var upspeed = 500;
var dropslop = 30;
for (i=0; i<holder.maxdrops; i++) {
holder.attachMovie("circleclip", "drop"+i, i+5);
focuseddrop = holder["drop"+i];
focuseddrop.cacheAsBitmap = true;
focuseddrop._x = random(Stage.width);
focuseddrop._y = random(Stage.height);
focuseddrop._yscale = random(100);
focuseddrop._rotation = -dropslop;
}
var dropup = setInterval(movedrop, 1);
function movedrop() {
for (i=0; i<holder.maxdrops; i++) {
focuseddrop = holder["drop"+i];
focuseddrop._rotation = -dropslop;
focuseddrop._y += 25+upspeed/focuseddrop._yscale;
focuseddrop.x += Math.tan(dropslop);
if (focuseddrop._y>=Stage.height+20) {
focuseddrop._y = random(30);
focuseddrop._x = random(Stage.width);
}
}
}
Hoàng Hữu Cánh @ 15:08 26/12/2010
Số lượt xem: 795
- Code sóng nước lung linh (26/12/10)
- Hiệu ứng ánh sáng (21/03/10)
- Hiệu ứng sương mù (21/03/10)
- Làm hiệu ứng mưa bằng Flash (20/03/10)
- Cách làm đồng hồ kim bằng Flash (20/03/10)










Các ý kiến mới nhất