Comunidad de diseño web y desarrollo en internet online

Ayuda con efecto nieve

Citar            
MensajeEscrito el 29 Nov 2007 02:13 am
:shock: hola estoy haciendo el efecto de nieve pero cuando lo publico swf y se maximiza la nieve se ve por fuera del marco...

Agradezco su colaboracion

Angela

Por angie7447

5 de clabLevel



Genero:Femenino  

msie
Citar            
MensajeEscrito el 30 Nov 2007 05:20 pm
mira yo te ayudo pero puedes adjuntar algo del codigo?

Por diegoalejo

3 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 30 Nov 2007 05:42 pm
HOLA MUCHAS GRACIAS ESTE CODIGO EL BANNER QUE ESTOY DISEÑANDI MIDE 550PX * 130PX

GRACIAS

ANGIE

function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}
function moveSnow() {
if (this.moving) {
this._y += this.speed;
this._x += Math.cos(this._y / 10);

if (this.hitTest(_root.rect_mc.Ice_mc)) {
this.moving = false;
this.stopCounter = 0;
}

if (this._y > 327){
removeMovieClip(this);

}
}
else {
this.stopCounter++;
if (this.stopCounter > 500) {
this.onEnterFrame = null;
this.removeMovieClip();
}
}
}
function createSnow(){
i = _root.getNextHighestDepth();
tmp = _root.attachMovie("SnowFlake","snowflake_mc" +i,i);
tmp._x = randRange(1,550);
tmp._y = -1;
tmp._alpha = randRange(50, 100);
tmp.speed = randRange(1,10);
tmp._xscale = randRange(70,110);
tmp._yscale = tmp._xscale;
tmp.moving = true;
tmp.onEnterFrame = moveSnow;
}
control_mc.onEnterFrame = function() {
createSnow();
}

Por angie7447

5 de clabLevel



Genero:Femenino  

msie
Citar            
MensajeEscrito el 30 Nov 2007 06:39 pm
No has optado por utilizar una mascara para que no se visualice la nieve fuera de tu marco?

Por flashreloco

Claber

1310 de clabLevel

1 tutorial
1 articulo

Genero:Masculino  

Webdesigner & Mandilon 2.0

firefox
Citar            
MensajeEscrito el 30 Nov 2007 06:53 pm

angie7447 escribió:


if (this._y > 327){ //en esta parte cambia tu valor de 327 a 120 para que no salga de tu marco la nieve


Suerte ^^

Por flashreloco

Claber

1310 de clabLevel

1 tutorial
1 articulo

Genero:Masculino  

Webdesigner & Mandilon 2.0

firefox
Citar            
MensajeEscrito el 30 Nov 2007 08:43 pm
Muchas Gracias :)

Por angie7447

5 de clabLevel



Genero:Femenino  

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.