In as2 le variabili prima di essere usate devono essere create, nel codice manca la creazione di Object.environment.dotCount e di angle.
Dovrebbe andare così
Codice PHP:
angle = 0;
Object.environment = this;
Object.environment.fl = 300;
Object.environment.dotCount = 0;
Object.environment.maxDots = 20;
this.createEmptyMovieClip ("field",1);
this.field._x = 400;
this.field._y = 150;
this.onEnterFrame = function () {
if (Object.environment.dotCount<Object.environment.maxDots) {
Object.environment.dotCount++;
makedot ();
}
angle = angle+(this._xmouse-400)/399;
y = 5;
};
function makedot () {
nombre = "dot"+String (depth++);
neo = field.attachMovie ("dot", nombre, depth);
neo.x = 0.750000*(random (400*2)-400);
neo.z = 0.750000*(random (400*2)-400);
}
stop ();