high guys… i admit it. i am no coder. but i am ok at understanding it and mixing it. kind of. i was hoping that some wiz out there could make this cpu intensive code, a little lighter:
a brief intro about the code: the code is used for a mouse over water ripple effect. it looks good once you tween the mask right. but the bigger the mask gets (to make it more realistic the more cpu it chews up). its a Flash 8 as2 code.
//image area siza: xxx, yyy,
map = new flash.display.BitmapData(288, 288, true, 0);
this.createEmptyMovieClip(“bmp”, 10);
bmp.attachBitmap(map, 0, “auto”, true);
bmp.cacheAsBitmap = true;
blur = new flash.filters.BlurFilter();
blur.blurx = 40;
blur.blury = 40;
blur.quality = 6;
dmf = new flash.filters.DisplacementMapFilter();
dmf.mapBitmap = map;
dmf.mode = “ignore”;
//warp
dmf.scaleX = -25;
dmf.scaleY = -30;
dmf.componentX = 3;
dmf.componentY = 1;
dmf.alpha = 1;
dmf.mapPoint = new flash.geom.Point(0, 0);
img.filters = [dmf];
bmp.filters = [blur];
i = 0;
z = 0;
this.onMouseMove = function ()
{
var _loc1 = cont.attachMovie(“tropfen”, “t” + i++, i, {_x: _xmouse + 30, _y: _ymouse});
_loc1.cacheAsBitmap = true;
};
this.onEnterFrame = function ()
{
bmp._visible = false;
map.draw(cont);
map.draw(bmp);
img.filters = [dmf];
};
is there a way to translate as2 to as3? a program perhaps (im always looking for easy ways)
Cheeres guys!