|
|||||||
| Web Tasarım İnternet sitesi ile ilgili kodlar, kaynaklar, ipuçları, uygulamalar ve diğer herşey. |
![]() |
|
|
Konu Araçları |
|
|
#1 (permalink) |
|
Teknik Ressam
![]() Katılma Tarihi: Tem 2006
Nereden: SAMSUN
Mesajlar: 917
|
Action script çalışmalarını sizlerde paylaşabilirsiniz.
Busch Çalı süpürgesi
Alttaki action script'i boş bir çalışma sayfasında ilk framenin action paneline yapıştırın ve test edin. function Peek(prnt){ if(prnt==null){ this.px = 275; this.py = 400; this.vx = 3*(Math.random()-.5); this.vy = -6; this.s = 15; this.color = 0x00000; }else{ this.px = prnt.px; this.py = prnt.py; this.vx = prnt.vx; this.vy = prnt.vy; this.s = prnt.s; this.color = prnt.color; } this.sv = Math.random()*0.1 + 0.2; this.b = (Math.random()-.5)*0.7/(this.s); this.bv = (Math.random()-.5)*0.01; } function step(r){ p = peeks[r]; p.px += p.vx; p.py += p.vy; sinb = Math.sin(p.b); cosb = Math.cos(p.b); vx = p.vx*cosb - p.vy*sinb; vy = p.vx*sinb + p.vy*cosb; p.vx = vx; p.vy = vy; p.b += p.bv; p.s -= p.sv; if(p.s<=0){ peeks.splice(r, 1); } } peeks = []; a = 5; ct = new flash.geom.ColorTransform(1,1,1,1, a,a,a,a); bmp = new flash.display.BitmapData(550, 400, false, 0xffffff); this.attachBitmap(bmp, 1); this.createEmptyMovieClip("vp", 2); vp._visible = false; t = false; this.onEnterFrame = function(){ vp.clear(); for(r in peeks)if(peeks[r]!=null){ cp = peeks[r]; x1 = cp.px; y1 = cp.py; step(r); x2 = cp.px; y2 = cp.py; vp.lineStyle(cp.s, 0x000000); vp.moveTo(x1, y1); vp.lineTo(x2, y2); } t=!t; bmp.draw(vp); } function fade(){ bmp.colorTransform(bmp.rectangle, ct); } function fork(){ if(peeks.length && random(5)!=0){ np = new Peek(peeks[random(peeks.length)]); }else{ np = new Peek(null); } peeks.push(np); } function mfork(){ for(m=0;m<5;m++)fork(); } interval_fork = setInterval(fork, 50); interval_fade = setInterval(fade, 500); Halat Yeni bir movie clip oluşturun küküphanedeki movie clip'in "linkage" seçeneğini aktif edin ve identifer kısmına "node" ismini verin. movie clip'i ana sahneye sürükleyin ve "instance name"sine "mouse" adını verin. Ana sahnedeki movie clip'in bulunduğu frame'nin action paneline alttaki kodu yapıştırın ve test edin. function nabs(dx,dy,px,py){ var rx,ry; if(dx==0){ rx = 0; ry = py; }else if(dy==0){ rx = px; ry = 0; }else{ rx = (py + dx/dy*px)/(dy/dx + dx/dy); ry = dy/dx*rx; } return { x: rx, y: ry }; } dis = 6; n = 70; function ikmove(actor, reactor, vx, vy){ actor._x += vx; actor._y += vy; dx = mpx - actor._x; dy = mpy - actor._y; dm = nabs(dx,dy,vx,vy); reactor._x += dm.x; reactor._y += dm.y; dx = reactor._x - actor._x; dy = reactor._y - actor._y; if(dx==0 && dy==0){ reactor._x += dis; dx = dis; } d = Math.sqrt(dx*dx+dy*dy); f = dis/d; nx = dx*f - dx; ny = dy*f - dy; reactor._x += nx; reactor._y += ny; return {x:dm.x+nx,y:dm.y+ny} } for(i=0;i<n;i++){ this.attachMovie("node","n"+i,i+1); o = this["n"+i]; o._x = 200 + i%2*dis; o._y = 100; } sdis = 4; this.onEnterFrame = function(){ for(i=0;i<n;i++){ o = this["n"+i]; if(i==0){ p = mouse; vx = _xmouse - mouse._x; vy = _ymouse - mouse._y; }else{ p = this["n"+(i-1)]; vx = v.x; vy = v.y; } v = ikmove(p, o, vx, vy); } this.clear(); this.moveTo(_xmouse+sdis, _ymouse+sdis) for(i=0;i<n;i++){ this.lineStyle(5,0x909090,100); o = this["n"+i]; this.lineTo(o._x+sdis, o._y+sdis); } this.moveTo(_xmouse+2, _ymouse+2) for(i=0;i<n;i++){ this.lineStyle(5,(i%2)?0x5C461D:0x7C5F27); o = this["n"+i]; this.lineTo(o._x+2, o._y+2); } }
__________________
Bana Gözlerinle Değil Sözlerinle Anlat...
|
|
|
|
|
|
#2 (permalink) |
|
Katılma Tarihi: Eki 2008
Nereden: 1
Mesajlar: 8
|
the secret of success is constancy of purpose.---------------------------------------------------wedding invitations, warhammer gold, warhammer gold, warhammer gold, wow power leveling,
__________________
60 wow power leveling |
|
|
|
|
|
#3 (permalink) |
![]() Katılma Tarihi: Haz 2007
Nereden: Win32
Yaş: 16
Mesajlar: 1,358
|
Çok güzel olmuş emeğine sağlık.Bu arada bu kodlar action script 2.0 kodları 3.0 değil...
__________________
ALBUM DOWNLOAD DJ ATMAC |
|
|
|
![]() |
| Şu Anda Konuyu İnceleyen Aktif Kullanıcılar: 1 (0 üye ve 1 misafir) | |
| Konu Araçları | |
|
|