27 errors on the destructable terrain.
Destructable terrain soesnt work!
I made a square with the name of square and an instance of square...
And everything the map named map0 in instance- and normal names and i mad a circle.
But if i start it up it says:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
import flash.display.BitmapData;
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: Statement must appear within on/onClipEvent handler
import flash.geom.ColorTransform;
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: Statement must appear within on/onClipEvent handler
import flash.geom.Matrix;
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: Statement must appear within on/onClipEvent handler
var max:Number = 400;
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 7: Statement must appear within on/onClipEvent handler
var myMatrix:Matrix = new Matrix();
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 12: Statement must appear within on/onClipEvent handler
var myCT:ColorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 18: Statement must appear within on/onClipEvent handler
var myBmp:BitmapData = new BitmapData(1000, 1000, true, 0x00000000);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 20: Statement must appear within on/onClipEvent handler
attachBitmap(myBmp, 0, "never", false);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 22: Statement must appear within on/onClipEvent handler
attachMovie("hole", "hole_mc", 10);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 23: Statement must appear within on/onClipEvent handler
hole_mc._visible = false;
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 25: Statement must appear within on/onClipEvent handler
myMatrix.translate(0, 120);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 28: Statement must appear within on/onClipEvent handler
attachMovie("square", "square_mc", 11);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 29: Statement must appear within on/onClipEvent handler
function makeMap(x) {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 38: Statement must appear within on/onClipEvent handler
onMouseDown = function () {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 59: Statement block must be terminated by '}'
if (myBmp.getPixel(_root[i]._x, _root[i]._y) != 0) {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 80: Syntax error.
// colors instead of removing pixels.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 57: Statement block must be terminated by '}'
if (_root[i]._name != "square_mc") {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 80: Syntax error.
// colors instead of removing pixels.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 52: Statement block must be terminated by '}'
if (_root[i]._name.indexOf("squar e") != -1) {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 80: Syntax error.
// colors instead of removing pixels.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 49: Statement block must be terminated by '}'
for (i in _root) {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 80: Syntax error.
// colors instead of removing pixels.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 42: Statement block must be terminated by '}'
onEnterFrame = function () {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 80: Syntax error.
// colors instead of removing pixels.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 42: Statement must appear within on/onClipEvent handler
onEnterFrame = function () {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
_root[i].removeMovieClip();
And more! Dont put codes in a collab what doesnt work! 27 errors!
Give me the real script please.Akadra,