Código ActionScript :
a = 1; carga = 1; br = 155; s = 5; createEmptyMovieClip("efecto", this.getNextHighestDepth()); offset = new flash.geom.Point(); onEnterFrame = function () { if (carga == -1) { img = flash.display.BitmapData.loadBitmap("imagenp"); marco.draw(img, new flash.geom.Matrix(1, 0, 0, 1, 0, h / 7)); marco2 = marco.clone(); } // end if if (carga == 1) { img = flash.display.BitmapData.loadBitmap("imagenc"); w = img.width; h = 4 * img.height / 3; marco = new flash.display.BitmapData(w, h, true, 0); ola = marco.clone(); marco.draw(img, new flash.geom.Matrix(1, 0, 0, 1, 0, h / 7)); marco2 = marco.clone(); efecto.attachBitmap(marco, 0); desMap = new flash.filters.DisplacementMapFilter(ola, new flash.geom.Point(), 8, 8, 24, 20, "clamp"); } // end if carga = 0; if (br == 0) { carga = a; s = 5; } // end if br = br + s * (br != 160); offset.x = offset.x - 5.600000E+000 * w / 100; offset.y = offset.y - 2.600000E+000 * w / 100; ola.perlinNoise(w, 2 * h, 1, 0, true, true, 8, true, [offset]); marco.perlinNoise(w / 1.500000E+000, h / 3, 1, 0, true, true, 7, true, [offset]); marco.merge(marco2, new flash.geom.Rectangle(0, 0, w, h), new flash.geom.Point(), br, br, br, 256); efecto.filters = [desMap]; }; this.onMouseDown = function () { a = -a; s = -5; br = 155; };
pero medio como que se rompee, que puedo arreglar? para que esto no suceda?