BitmapDisplace Class

Not sure if I named it properly, but this class allows you specify a linked bitmap from the library to act as a displacement filter for whatever movieclip you want. Pretty powerful stuff if you know how to do displacements in photoshop and can get the right grayscale. Anyway what do you all think?

[URL=“http://gdinteractive.com/dev/BitmapDisplace/BitmapDisplaceClass.zip”]Source files

thats amazing - I can’t see as to how you would use it but its still amazing.

duuuuuuuuuuuude thats soo amazing :slight_smile: – If you post the FLA ill def find a use for it and repost the result :slight_smile: (silent nudge)

OOps my bad- didnt see the link to source ( thoughyt it was a heading) – But the link is dead???

We need FLA :smiley:

Amazing Work !

he posted the source…, anyways nice work =D

It is for me, too.

the link is gone
:puzzle:

really nice

Sorry about the bad link guys, it should be fixed now. Thanks for the comments and I’d love to see what you guys are using this for, I developed it myself to make stuff reflect off of shiny things. Displacement stuff rocks :slight_smile:

thats coool. Looks hard :slight_smile: great job

Verry impressive! :thumb:

really nice, but i don’t use anyone elses work :stuck_out_tongue:

serkios- I recommend adding methods for starting and stopping the onEnterFrame event. For example, rename the “onEnterFrame” in your class to “displace”, the add this:


public function startDisplacement():Void{
		this.onEnterFrame = displace;
		
	}
	public function stopDisplacement():Void{
		delete this.onEnterFrame;
	}

The in your .fla you can add calls to startDisplacement and stopDisplacement in your onMouseUp and onMouseDown events:


text_mc.onMouseDown = function () {
	text_mc.startDrag();
	displacement.startDisplacement();
}

text_mc.onMouseUp = function () {
	text_mc.stopDrag();
	displacement.stopDisplacement();
}

This way the onEnterFrame isn’t running when it’s not needed.

Thanks Lindquist-- Thats a good suggestion and will implement the change when I can.

that’s tight dude… good stuff :smiley:

Yeah, I forgot to say in my last post, sweet job man.

I’ve updated the class with Lindquist’s suggestion. The same source link should work.

Thanks for the comments guys! :mu:

That is really awesome, thx for that…:slight_smile:

I really a good piece of code