20K flash file
Out of context: Reply #20
- Started
- Last post
- 28 Responses
- hiatus0
So I'm using this displacement filter to make a heat haze/wavey look to the image and need to have it stop after like 10 sec. Right now I have all the keyframes running with this code till frame199 then on 200 I put a stop(); - but I get an error
heres the filter script:
Stage.scaleMode = 'noScale';displace_mc.createEmptyMovieClip... 1);
var ramp:MovieClip = displace_mc.ramp;
ramp.swapDepths(1);var speed = 2;
var channel = 1;// DISPLACEMENT variables
var flapX = 20;
var flapY = 6;
var mode = "clamp";
var offset = new flash.geom.Point(0, 300);var displaceBitmap:flash.display.Bit... = new flash.display.BitmapData(ramp._w... ramp._height);
var displaceFilter:flash.filters.Dis... = new flash.filters.DisplacementMapFil... offset, channel, channel, flapX, flapY, mode);// PERLINNOISE variables
var baseX = 20;
var baseY = 7;
var octs = 1;
var seed = Math.floor(Math.random() * 100);
var stitch = true;
var fractal = true;
var gray = false;var noiseBitmap:flash.display.Bitmap... = new flash.display.BitmapData(500, 1);
noiseBitmap.perlinNoise(baseX, baseY, octs, seed, stitch, fractal, channel, gray);var shift:flash.geom.Matrix = new flash.geom.Matrix();
// every frame
onEnterFrame = function(){// move the matrix by speed along x to shift the noise
shift.translate(speed, 0);with (displace_mc.perlin){
clear();
beginBitmapFill(noiseBitmap, shift);
moveTo(0,0);
lineTo(ramp._width, 0);
lineTo(ramp._width, ramp._height);
lineTo(0, ramp._height);
lineTo(0, 0);
endFill();
}displaceBitmap.draw(displace_mc...
girl_mc.filters = [displaceFilter];
}onMouseDown = function(){
displace_mc._visible = false;
girl_mc._visible = true;
}onMouseUp = function(){
displace_mc._visible = false;
girl_mc._visible = true;
}// initiate
onMouseUp();