Wood texture
This is certainly not the best way to make it, yet the effect is quite ok, and the code is quite simple~ you need fp8.5 to view it becoz it is made with AS 3.
package {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import flash.util.*;
public class wood extends MovieClip {
public function wood() {
var bd:BitmapData=new BitmapData(300,300);
var bd2:BitmapData=new BitmapData(300,300);
var bd3:BitmapData=new BitmapData(300,300,false,0×996600);
var bd4:BitmapData=new BitmapData(300,300);
var b:Bitmap=new Bitmap(bd4);
bd.perlinNoise(400,100,1,128,false,true,1,true);
var ring:int=15;
for(var i:int=0;i<300;i++){
for(var j:int=0;j<300;j++){
var temp:Number=bd.getPixel(i,j)*ring;
bd2.setPixel(i,j,temp);
}
}
bd4.draw(bd2,new Matrix(),new ColorTransform(1,1,1,1,0,0,0,-70));
bd4.draw(bd3,new Matrix(),new ColorTransform(1,1,1,1,0,0,0,-30));
addChild(b);
}
}
}