1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Stage.scaleMode = "noScale";
noise = new flash.display.BitmapData(bgLave._width+10, bgLave._height+10);
this.createEmptyMovieClip("bmp_mc", this.getNextHighestDepth());
bmp_mc.attachBitmap(noise, 1);
this.createEmptyMovieClip("bmp_mc2", this.getNextHighestDepth());
var bmp = new flash.display.BitmapData(bgLave._width, bgLave._height, true, 0x000000FF);
bmp.draw(bgLave);
bmp_mc2.attachBitmap(bmp, 1);
bmp_mc2._x = bgLave._x;
bmp_mc2._y = bgLave._y;
offset1 = new flash.geom.Point(0, 0);
pt = new flash.geom.Point(0, 0);
bmp_mc._visible = false;
//bgLave._visible=false;
this.onEnterFrame = function() {
offset1.y = offset1.y-5;
offset1.x = offset1.x-5;
noise.perlinNoise(100, 200, 1, 200, false, true, 1, false, [offset1]);
dMap = new flash.filters.DisplacementMapFilter(noise, pt, 1, 1, 20, 20, "ignore");
bmp_mc2.filters = [dMap];
}; |
Partager