Im having a problem with this attach movie clip code first heres the code im basing my code on:
init = function () {
width = 550;
// pixels
height = 400;
// pixels
max_snowsize = 10;
// pixels
snowflakes = 500;
// quantity
for (i=0; i<snowflakes; i++) {
t = attachMovie("snow", "snow"+i, i);
t._alpha = 20+Math.random()*60;
t._x = -(width/2)+Math.random()*(1.5*width);
t._y = -(height/2)+Math.random()*(1.5*height);
t._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t.k = 1+Math.random()*2;
t.wind = -1.5+Math.random()*(1.4*3);
t.onEnterFrame = mover;
}
};
mover = function() {
this._y += this.k;
this._x += this.wind;
if (this._y>height+10) {
this._y = -20;
}
if (this._x>width+20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
} else if (this._x<-20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
}
}
init();
Heres my code which is pretty much copied except it using the mc with the linkage “xenon”
init2 = function () {
width = 550;
// pixels
height = 400;
// pixels
max_xenonsize = 10;
// pixels
xenonflakes = 500;
// quantity
for (i=0; i<xenonflakes; i++) {
t2 = attachMovie("xenon", "xenon"+i, i);
t2._alpha = 20+Math.random()*60;
t2._x = -(width/2)+Math.random()*(1.5*width);
t2._y = -(height/2)+Math.random()*(1.5*height);
t2._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t2.k = 1+Math.random()*2;
t2.wind = -1.5+Math.random()*(1.4*3);
t2.onEnterFrame = mover2;
}
};
mover2 = function() {
this._y += this.k;
this._x += this.wind;
if (this._y>height+10) {
this._y = -20;
}
if (this._x>width+20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
} else if (this._x<-20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
}
}
init();
The problem is that the second code with the xenon wont work at all because the xenon aren’t appearing. Can anyone help with this? Thanks (ummm… another problem is that im trying to get this game released by friday before 9:15 :P)
Thanks ^^