El efecto de cuerda elastica está realizado en actionscript 1.0 y para flash player 6, el efecto no se ve si lo muestro en el flash player 9.
Seguramente el problema se soluciona pasando el código de as 1.0 a as 2.0 pero no he encontrado un "diccionario" que me ayude a traducirlo.
los codigos a pasar de as1 a as 2 serían:
Código ActionScript :
onClipEvent(enterFrame) {
_x = _root.cross._x;
_y = _root.cross._y;
_xscale = (_root.ball._x - _root.cross._x);
_yscale = (_root.ball._y - _root.cross._y);
updateAfterEvent();
}
Código ActionScript :
onClipEvent (load) {
defaultX = _x;
defaultY = _y;
rotaini = 0;
newXpos = defaultX;
newYpos = defaultY;
newrotation0 = 0;
ratio = 0.05;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.onRollOver = function() {
num = Math.round(Math.random()*40)-40;
newrotation0 = (this._rotation+num-this._rotation);
newrotation = newrotation0;
};
xDifference = _root._xmouse-defaultX;
yDifference = _root._ymouse-defaultY;
newXpos = (_root._xmouse-xDifference/maxDistance);
newYpos = (_root._ymouse-yDifference/maxDistance);
_x += newX;
_y += newY;
} else {
newXpos = defaultX;
newYpos = defaultY;
newrotation = rotaini;
}
newX = (newX*friction)+((newXpos-_x)*ratio);
newY = (newY*friction)+((newYpos-_y)*ratio);
_x += newX;
_y += newY;
_rotation += (newrotation-_rotation)*0.10;
}
¿Alguien me puede ayudar?
[BOFH]Cuando publiques código ActionScript colócalo entre las etiquetas [*as] y [*/as] (sin los asteriscos) para que sea más legible. The Fricky![/BOFH]
