Tema: efecto nieve
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/09/2009, 17:00
ickr
 
Fecha de Ingreso: enero-2009
Mensajes: 8
Antigüedad: 15 años, 3 meses
Puntos: 0
efecto nieve

hola a todos, bueno tengo una duda, resulta que encontre un efecto de nieve en internet para action 2.0 pero el asunto es que yo quiero hacer que la nieve aparesca desde abajo hacia arriba y no de arriba hacia abajo como es lo tipico, debe ser algo muy simpe de cambiar en el codigo para que aparesca desde abajo hacia arriba, lo quiero para un experimento en un sito que estoy armando, ojala alguien me pueda ayudar, el codigo que estoy utilizando es el siguiente:

en el primer frame:
snowflakes = 75;
do {
duplicateMovieClip(snow, "snow"+k, k);
k++;
} while (k != snowflakes);


y este va en el moviclip que se llama snow:

onClipEvent (load) {
//variables
width = 300;
height = 200;
//random x,y, and alpha
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 20+Math.random()*50;
//random x and y for flakes
this._x = -width+Math.random()*(3*width);
this._y = -10+Math.random()*height;
//speed and trigonometric value
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
rad = 0;
}
onClipEvent (enterFrame) {
// horizontal movement
rad += (k/180)*Math.PI;
xmovement = _root._xmouse;
this._x -= Math.cos(rad)+(xmovement-(width/2))/50;
// vertical movement
this._y += i;
// remove clips when they misbehave (overstep boundaries)
if (this._x>(width+50)) {
this._x = -45;
this._y = Math.random()*height*2;
}
if (this._x<-50) {
this._x = width+45;
this._y = Math.random()*height*2;
}
if (this._y>=height) {
this._y = -50;
this._x = -width+Math.random()*(3*width);
}
}



ojala alguien me pueda ayudar , saludos a los flasheros.

Última edición por ickr; 14/09/2009 a las 18:13