Vertical root._y Scrolling (Piggy Platformer!)

Note: I moved this from the mario thread as I didn’t want to take the wind away from other people’s queries.

Now then,
How would you vertical root._y scrolling when the character jumps? I got the _x scrolling down, and it seems simple enough. But the jumping is a real pain.

My example is here:

The piggy can jump and the platform will move down, but when the piggy descends, the platform won’t move back up fast enough. So that means for each jump piggy makes, the platform sinks lower and lower.
Here’s the code I’m using at the moment. The code in red is what makes the platform move:

if (Key.isDown(Key.UP) && !jumping) {
			if (left == false) {
			if (left == true) {
			move = false;
			vel_y = 17;
			jumping = true;
		if (jumping == true) {
			vel_y -= 1;
			if (vel_y<=-17) {
				vel_y = -17;
			this._y -= vel_y;
[color=red]**			_root.platform._y += vel_y/5;**[/color]
		if (!_root.platform.hitTest(this._x+25, this._y+10, true) && !jumping) {
			fall += 1;
			move = false;
			if (fall>17) {
				fall = 17;
			this._y += fall;
		for (i=1; i<50; i++) {
			if (!_root.platform.hitTest(_x+25, _y-i, true)) {
				_y -= i-3;
			} else if (_root.platform.hitTest(_x+25, _y-i, true)) {
				fall = 0;
				vel_y = 0;
				jumping = false;
				move = true;

Sources are here:
Flash MX 2004:
Flash MX:

Hope someone can help -I’ll personally make them a dish from my Wagamama cookbook!