# \[CS4\] Changing Flash 6 codes to Flash 8 AS2

**URL:** <https://forum.kirupa.com/t/cs4-changing-flash-6-codes-to-flash-8-as2/297957>\
**Category:** flash\
**Created:** [October 11, 2009, 7:28am UTC](https://forum.kirupa.com/t/cs4-changing-flash-6-codes-to-flash-8-as2/297957 "2009-10-11T07:28:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbuged](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@humbuged](https://forum.kirupa.com/u/humbuged)\
**Post date:** [October 11, 2009, 7:28am UTC](https://forum.kirupa.com/t/cs4-changing-flash-6-codes-to-flash-8-as2/297957/1 "2009-10-11T07:28:34Z")

</div>

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

```auto

_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 🙂
