Created
February 5, 2010 18:16
-
-
Save arpit/296050 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flash.filters.DisplacementMapFilter; | |
import flash.display.BitmapData; | |
import flash.geom.Matrix; | |
import flash.geom.Point; | |
var str = 100; | |
this.addEventListener (Event.ENTER_FRAME,enterframe); | |
function enterframe (e:Event):void { | |
var map:BitmapData = new BitmapData (1400, 1250, false, 0xe80000); | |
var mtx:Matrix = new Matrix(); | |
mtx.translate(mouseX-253, mouseY-166); | |
this.sourceMap.visible = false; | |
map.draw(this.(DISPLACE_CLIP), mtx); | |
var dmf:DisplacementMapFilter = new DisplacementMapFilter(map, new Point(0, 0), 1, 1, 0, str, "clamp", 0x000000, 1); | |
(DISPLACEE).filters = [dmf]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment