error500
10.02.2003, 18:52
Столкнулся с проблемой объектов в флэшь пять
дело такое вощем в шестом есть функция объект регистер класс а в пятом х. з. как сделать вот код из шестого как его переделать под пятый ????
function Snow(){
this._x=random(500)+1;
this._y=random(300);
this._width=10+random(15);
this._height=this._width;
this.amplitude=random(5)+3;
this.amplitude_step=random(25)+1;
this.down_speed=random(7)+this.amplitude_step;
}
Snow.prototype = new MovieClip();
Snow.prototype.onEnterFrame=function(){
this._y+=this.down_speed;
this._x+=this.amplitude_step;
this.amplitude_pos++;
if (Math.abs(this.amplitude_pos)>=this.amplitude){
this.amplitude_step*=-1;
this.amplitude_pos=0;
}
if (this._y >=500){
this._y=-1;
}
}
Object.registerClass("snow1", Snow );
Object.registerClass("snow2", Snow );
работующее можно глянуть на моём сайте
дело такое вощем в шестом есть функция объект регистер класс а в пятом х. з. как сделать вот код из шестого как его переделать под пятый ????
function Snow(){
this._x=random(500)+1;
this._y=random(300);
this._width=10+random(15);
this._height=this._width;
this.amplitude=random(5)+3;
this.amplitude_step=random(25)+1;
this.down_speed=random(7)+this.amplitude_step;
}
Snow.prototype = new MovieClip();
Snow.prototype.onEnterFrame=function(){
this._y+=this.down_speed;
this._x+=this.amplitude_step;
this.amplitude_pos++;
if (Math.abs(this.amplitude_pos)>=this.amplitude){
this.amplitude_step*=-1;
this.amplitude_pos=0;
}
if (this._y >=500){
this._y=-1;
}
}
Object.registerClass("snow1", Snow );
Object.registerClass("snow2", Snow );
работующее можно глянуть на моём сайте