View Full Version : BitmapDisplace Class
serkios
March 27th, 2006, 11:39 PM
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?
Source files
(http://gdinteractive.com/dev/BitmapDisplace/BitmapDisplaceClass.zip)
stereochris
March 27th, 2006, 11:42 PM
thats amazing - I can't see as to how you would use it but its still amazing.
pixi
March 28th, 2006, 03:11 AM
duuuuuuuuuuuude thats soo amazing :) -- If you post the FLA ill def find a use for it and repost the result :) (silent nudge)
pixi
March 28th, 2006, 03:12 AM
duuuuuuuuuuuude thats soo amazing :) -- If you post the FLA ill def find a use for it and repost the result :) (silent nudge)
OOps my bad- didnt see the link to source ( thoughyt it was a heading) -- But the link is dead???
Libyan
March 28th, 2006, 05:23 AM
We need FLA :D
Amazing Work !
bombsledder
March 28th, 2006, 06:11 AM
he posted the source..., anyways nice work =D
Krilnon
March 28th, 2006, 07:04 AM
But the link is dead??? It is for me, too.
Gupps
March 28th, 2006, 08:23 AM
the link is gone
:puzzle:
EmeniusXp
March 28th, 2006, 08:34 AM
really nice
serkios
March 28th, 2006, 09:50 AM
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 :)
RevoGiant
March 28th, 2006, 11:50 AM
thats coool. Looks hard :) great job
Bokke
March 28th, 2006, 03:03 PM
Verry impressive! :thumb:
bombsledder
March 28th, 2006, 03:12 PM
really nice, but i don't use anyone elses work :P
Lindquist
March 28th, 2006, 06:39 PM
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.
serkios
March 28th, 2006, 07:47 PM
Thanks Lindquist-- Thats a good suggestion and will implement the change when I can.
simplistik
March 28th, 2006, 10:38 PM
that's tight dude... good stuff :D
Lindquist
March 28th, 2006, 11:22 PM
Yeah, I forgot to say in my last post, sweet job man.
serkios
March 29th, 2006, 11:52 AM
I've updated the class with Lindquist's suggestion. The same source link should work.
Thanks for the comments guys! :mu:
e-sarbak
March 29th, 2006, 01:33 PM
That is really awesome, thx for that...:)
vini
April 22nd, 2006, 10:17 PM
I really a good piece of code
codemonkeypete
April 24th, 2006, 07:18 AM
Just been looking at how you put this together, and found some rather interesting and very cool things out. :
1. I was able to replace the broken apart text graphic with a dynamic text field, and it still allowed displacement... woot woot
2. I was able to control the text via the tween class - which is also very sweet.
3. Added a random movement to the text_mc and watched as it moved around my face!!!!... Loving it!
sed|thh
April 24th, 2006, 11:39 AM
awesome work! fla please ^^
Pattt
April 24th, 2006, 11:58 AM
Wow, very nice! :) Where can I download the class? :D
pips
April 24th, 2006, 03:05 PM
awesome!
codemonkeypete
April 24th, 2006, 08:36 PM
Wow, very nice! :) Where can I download the class? :D
..at the beginning of this thread, the link that says "source" :cubs:
sed|thh
April 25th, 2006, 03:10 AM
lol didn't notice :D
serkios
April 25th, 2006, 12:06 PM
@codemonkeypete
I've been able to use it on traditional keyframe to keyframe tweens as well and haven't had any problems. Pretty handy for some nice touches in my normal animations. And yea, it should work on the content of any movieclip regardless because it caches the MC as a bitmap each time the displacement is added. Glad you're liking it!
codemonkeypete
April 25th, 2006, 06:02 PM
yea, i tried populating the text from a database and it bloody worked. i aactually used your effect with eilsoes random one and although it looked a bit trippy, it also worked well.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.