simpel funktion på object
Hvorfor virker det her ikke?Objektet bevæger sig ikke...
stop();
createEmptyMovieClip("sq1", 1);
sq1._x = 50;
sq1._y = 50;
sq1.attachMovie("sq", "sq1_new", 2);
function move_em() {
onEnterFrame = function () {
if (this._y == 200 && this._x<=500) {
go = "left";
} else {
go = "right";
}
if (this._x == 500 && this._y != 200) {
this._y += 10;
} else if (this._x == 50 && this._y != 50 && this._y != 300) {
this._y += 10;
count;
} else if (go == "left") {
this._x -= 10;
} else if (go == "right") {
this._x += 10;
}
};
}
sq1.move_em();
