[FLASH 8] Dueling Functions cancelling each other out

Hey everyone,

I am having difficulty with the following functions. What I want to do is just have one movie clip (we will call it plane_mc) go up at an angle, and have another movie clip (oh, lets just call it fallingCan_mc for kicks) that will go down at a particular angle. I got the plane to work fine with the following AS:


/* Plane motion script */
this.onEnterFrame = function () {
	/*Controls the plane motion to the left */
	if (this.plane_mc._x < 700) {
		this.plane_mc._x +=15;
	}
	
	/*Controls the plane motion up */
	if (this.plane_mc._y > -250) {
		this.plane_mc._y -=11;
	}
	
	/*Controls the plane height */
	if (this.plane_mc._height < 250) {
		this.plane_mc._height +=2;
	}
	
	/*Controls the plane width (2:5 ratio) */
	if (this.plane_mc._width < 150) {
		this.plane_mc._width +=5;
	}
}

But then when I added this code to the same Actions layer:


this.onEnterFrame = function () {
	/*Controls the can motion to the left */
	if (this.fallingCan_mc._x < 450) {
		this.fallingCan_mc._x +=1;
	}
	
	/*Controls the plane motion up */
	if (this.fallingCan_mc._y > 330) {
		this.fallingCan_mc._y +=5;
	}
	
	if (this.fallingCan_mc._x == 450) {
		this.fallingCan_mc._x -=2;
	}
	
	if (this.fallingCan_mc._y == 330) {
		this.fallingCan_mc._y -=1;
	}
}

It no workey. I tried the second function code on its own, and it didn’t work anyway, so I think it is tue culprit. Of course there could be some “Too many similar functions in the same Actions layer” rule that I don’t know about. Anyway, any help on this would be greatly appreciated by me and my precious falling cans…

Thanks in advance!