Can someone please convert this to as3?
I just can get it right…
Pls…
function drawEff()
{
var _loc2 = offsets.length;
for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
{
offsets[_loc1].y = offsets[_loc1].y + offsetSpeeds[_loc1];
} // end of for
noiseImage.perlinNoise(250, 800, 2, seed, true, true, null, true, offsets);
var _loc3 = flMask.transform.matrix;
_loc3.tx = noise_mc._x;
_loc3.ty = noise_mc._y;
noiseImage.draw(flMask, _loc3, flMask.transform.colorTransform, "multiply");
noiseImage.applyFilter(noiseImage, noiseImage.rectangle, new flash.geom.Point(0, 0), colFilter);
var _loc4 = noiseImage.getColorBoundsRect(4.294967E+009, 4.294967E+009);
var _loc5 = _loc4.height * _loc4.width;
flGlow((127 - _loc5 / 10) / 1024);
} // End of the function
function flGlow(amount)
{
var _loc1 = new flash.filters.ColorMatrixFilter([1 + amount, 0, 0, 0, 0, 0, 1 + amount, 0, 0, 0, 0, 0, 1 + amount, 0, 0, 0, 0, 0, 1, 0]);
canFront.filters = [_loc1];
canMain.filters = [_loc1];
} // End of the function
Stage.scaleMode = "noScale";
var pxPerSecond = 5.000000E-001;
var seed = Math.floor(Math.random() * 1000000000);
var offsetSpeeds = [20, 32];
var offsets = [new flash.geom.Point(0, 0), new flash.geom.Point(0, 0)];
var flMask = flContainer.flMask;
var noiseImage = new flash.display.BitmapData(flMask._width, flMask._height, false);
noise_mc = flContainer.createEmptyMovieClip("noise_mc", 1);
noise_mc._x = flMask._x;
noise_mc._y = flMask._y;
flContainer.blendMode = "screen";
flMask._visible = false;
noise_mc.attachBitmap(noiseImage, 1);
var colFilter = new flash.filters.ColorMatrixFilter([6, 0, 0, 0, -255, 5.500000E+000, 0, 0, 0, -255, 5, 0, 0, 0, -255, 0, 0, 0, 0, 255]);
drawEff();
onEnterFrame = function ()
{
drawEff();
};