먼저 물방울(여러 효과)을 만드신후
'name'를 'blob0'으로 하신후 'target'에 체크해주신후
액션을 주세요. (sprite화 하지마세요)
----------------------
onEnterFrame() {
move();
}
-----------------
아 위치는 오른쪽 배경 사이즈 바깥 밑에 두세요.
이제 ' 신'에다 액션만 주시면 된답니다.
------------
xxonLoad () {
movieclip.prototype.move = move;
movieclip.prototype.reset = reset;
for (n=1; n<=20; n++) {
blob0.duplicateSprite("blob" add n,n);
}
}
function getdistance(x,y,x1,y1) {
run = x1 - x;
rise = y1 - y;
return (_root.hyp(run, rise));
}
function hyp(a,b) {
return (Math.sqrt((a * a) + (b * b)));
}
function reset() {
width = 620;
height = 450;
this.x = this._x;
this.y = this._y;
this.speed = (Math.random() * 4) + 2;
this.targx = Math.random() * width;
this.targy = Math.random() * height;
dist = _root.getdistance(this.x, this.y, this.targx, this.targy);
norm = this.speed / dist;
this.diffx = (this.targx - this.x) * norm;
this.diffy = (this.targy - this.y) * norm;
}
function move() {
if (this.speed < _root.getdistance(this.x, this.y, this.targx, this.targy)) {
this.x = this.x + this.diffx;
this.y = this.y + this.diffy;
} else {
this.x = this.targx;
this.y = this.targy;
if (!this.t) {
this.t = getTimer();
}
if (1000 < (getTimer() - this.t)) {
this.reset();
this.t = 0;
}
}
this._x = this.x;
this._y = this.y;
}
-------------------------
수자로 된곳만 알아서 수정 해보세요~~
그리고 파도처럼 흔들리는 효과는
네모툴로 모양을 두개 만들어준후 그룹후
Rippling Water
이 효과만 준거랍니다. sprit'해주구..
※물방울 아닌 여러 효과로도 응용해보세요~~
'창고 속의 창고' 카테고리의 다른 글
[스크랩] 경추만 풀어도 건강을 바로 잡는다. (0) | 2007.07.22 |
---|---|
[스크랩] 한글로 만든 중국어 자판 (0) | 2007.07.20 |
[스크랩] 슈만 공진에 대하여 (0) | 2006.12.29 |
[스크랩] 단군 다뉴세문경 백동경. (0) | 2006.12.22 |
[스크랩] 당신 영혼의 완성된 꽃을 피워보세요 (0) | 2006.12.16 |