Hello I found this code to make images bounce but it only works when I set the settings to Flash 6. Can anyone tell me how to convert the code to work for Flash 8 AS2?
Would appreciate it if anyone could tell me how the code works
here’s the code
_quality = "LOW";
MovieClip.prototype.dragGoback = function(startX, startY, tempo, wobble) {
this.onEnterFrame = function() {
if (!dragging) {
dx = (dx+(startX-this._x)*tempo)*wobble;
dy = (dy+(startY-this._y)*tempo)*wobble;
this._x = this._x+dx;
this._y = this._y+dy;
}
// end if
for (i=1; i<=_root.cutout; i++) {
_root["m"+i]._x = startX-(startX-this._x)/_root.cutout*i;
_root["m"+i]._y = startY-(startY-this._y)/_root.cutout*i;
}// end of for
};
};
dragMe.onMouseDown = function() {
dragging = true;
this.startDrag(true);
};
dragMe.onMouseUp = function() {
dragging = false;
stopDrag();
};
dragMe.dragGoBack(dragMe._x,dragMe._y,1.000000E-01,9.900000E-01);
cutout = 30;
for (i=0; i<=cutout; i++) {
dragMe.duplicateMovieClip("m"+(cutout-i),cutout-i);
_root["m"+(cutout-i)].dynamask._xscale = 100+i*5;
_root["m"+(cutout-i)].dynamask._yscale = 100+i*5;
}// end of for
frame.swapDepths(cutout+1);
I don’t know anything about this code “MovieClip.prototype.” I know a little bit that the “for” codes are for looping/repeating things. And what are the numbers “1.000000E-01,9.900000E-01”?
I’ve attached the CS4 .fla here