Foros del Web » Creando para Internet » Flash y Actionscript »

[SOLUCIONADO] Que significado tiene este código. AS2

Estas en el tema de Que significado tiene este código. AS2 en el foro de Flash y Actionscript en Foros del Web. stop(); speed = 10; initial_width = 75; target_width = 450; sp = rect1._x; this.createEmptyMovieClip("emptymc", 0); emptymc.onEnterFrame = function() { for (i=1; i<=6; i++) { if ...
  #1 (permalink)  
Antiguo 06/03/2013, 13:32
anthony9564
Invitado
 
Mensajes: n/a
Puntos:
Que significado tiene este código. AS2

stop();
speed = 10;
initial_width = 75;
target_width = 450;
sp = rect1._x;
this.createEmptyMovieClip("emptymc", 0);
emptymc.onEnterFrame = function() {
for (i=1; i<=6; i++) {
if (_root.hit.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root["rect"+i].hitTest(_root._xmouse, _root._ymouse, true)) {
new_x = (_root.sp-(75*(i-1)))-rect1._x;
rect1._x += new_x/speed;
n_width = target_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width/speed;
} else {
n_width2 = initial_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width2/speed;
}
} else {
new_x = _root.sp-rect1._x;
rect1._x += new_x/(speed+50);
n_width2 = initial_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width2/(speed-1);
}
_root["rect"+(i+1)]._x = _root["rect"+i]._x+_root["rect"+i]._width;
_root["movie"+i]._x = _root["rect"+i]._x-1;
}
};

Esta en ActionScript 2.0
  #2 (permalink)  
Antiguo 07/03/2013, 08:35
 
Fecha de Ingreso: febrero-2013
Mensajes: 40
Antigüedad: 11 años, 2 meses
Puntos: 3
Respuesta: Que significado tiene este código. AS2

un MovieClip que responde a los movimientos del cursor.

Etiquetas: actionscript, as2, movie
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:21.