發表文章

目前顯示的是 6月, 2008的文章

onEnterFrame + curveTo

圖片
onEnterFrame = function(){ a1 = random(900)-50; a2 = random(700)-50; cline1 = random (200)-100; cline2 = random (200)-100; line = random(9999999999999)+1; linealpha = random(71); this.lineStyle(1,line,linealpha); this.curveTo(cline1,cline2,a1,a2); this.curveTo(cline2,cline1,a2,a1); }

不斷的lineTo

圖片
onEnterFrame=function(){ line1 = random(30)+1; linelocat1 = random(500); linelocat2 = random(400); movelocat1 = random(500); movelocat2 = random(400); linealp = random(30)+1; this.lineStyle(line1,0xFF0000,linealp); this.moveTo(linelocat2,linelocat1); this.lineTo(linelocat1,linelocat2); } onEnterFrame = function () { a1 = random (900) - 50; a2 = random (700) - 50; cline1 = random (200) - 100; cline2 = random (200) - 100; line = random (999999999999999999) + 1; linealpha = random (51); this.lineStyle (1,line,30); this.lineTo (a1,a2); this.lineTo (a1*2,a2*2); this.lineTo (a1/0.9,a2/0.2); };

點選不同次數而改變排列的AS

圖片
// import mx.transitions.Tween; // function setup() { picTotal = 100; allLayer = this.createEmptyMovieClip(“allLayer”, 0); picW = 5; penTNumber = 5; penCNumber = 0xFFFFFF; penANumber = 50; startX = 0; startY = 0; picLocX = 800; picLocY = 600; spdNumber = 3; spdDelay = 30; drawPic(); mouseClickTime = 0; } function drawPic() { for (i=0; i<picTotal; i++) { obj = allLayer.createEmptyMovieClip(“mc”+i, i); // penT = Math.round(Math.random()penTNumber); //penC = Math.round(Math.random()penCNumber); penA = Math.round(Math.random()penANumber+51); picLocationX = Math.round(Math.random()picLocX); picLocationY = Math.round(Math.random()picLocX); obj.Xspd = ((Math.random())+1(Math.round(Math.random()2)2-1))/spdDelay; obj.Yspd = ((Math.random())+1(Math.round(Math.random()2)2-1))/spdDelay; // obj.lineStyle(penT,penCNumber,penA); obj.moveTo(startX,startY); obj.lineTo(startX,startY-picW); obj.lineTo(startX,startY+picW); obj.moveTo(startX-picW,startY); obj.lineTo(startX+picW,startY); // obj.x = picLo...