Problem with Enable/Disable Objects C#

Hi guys,
I have imported a few characters in my scene but i can not disable or enable them by code.
I have tried more ways but i can not solve them.
Could you guide me?
I have tagged each images to “Fly1”,“Fly2”,Fly3",“Fly4”.
I want on each frame disable fly1 then enable fly2 then disable fly2 then enable fly3 then disable fly3 then enable fly4 again from the first start to disable and enable each images(character).
Errors: link text link text
Thanks
using UnityEngine;
using System.Collections;

public class animationsBirds : MonoBehaviour {
	public static int frameCounter =1;
	GameObject gos1;
	GameObject gos2 = GameObject.FindGameObjectWithTag("Fly2");
	GameObject gos3 = GameObject.FindGameObjectWithTag("Fly3");
	GameObject gos4 = GameObject.FindGameObjectWithTag("Fly4");
	// Use this for initialization
	void Start () {
	
		 gos1 = GameObject.FindGameObjectWithTag("Fly1");	}
	
	// Update is called once per frame
	void Update () {
		while (true) {
			Debug.Log (frameCounter);
			if (frameCounter == 1) {
				gos1.SetActive (false);
				gos2.SetActive (true);
			} else if (frameCounter == 2) {
				gos2.SetActive (false);
				gos3.SetActive (true);
			} else if (frameCounter == 3) {
				gos3.SetActive (false);
				gos4.SetActive (true);
			} else if (frameCounter == 4) {
				gos4.SetActive (false);
				gos1.SetActive (true);
			}
			frameCounter++;
			if (frameCounter <= 5) {
				frameCounter = 0;
			}
		}
	}
	}

Hello, @Tootro20.

We cannot call function, GameObject.FindObjectWithTag(…) when declaring a variable.

The solution is to call that function some where else, maybe in the Start function - depends on the design of your game. Example:

// Declarations:
GameObject gos1;
GameObject gos2;

// Initialization:
void Start() {
    gos1 = GameObject.FindObjectWithTag( "Fly1" );
    gos2 = GameObject.FindObjectWithTag( "Fly2" );
}

For simplicity and cleaner codes, we create an array and a loop to handle those game objects. Example:

// Declaration:
// Max size is 4 because there are only 4 of these game objects ("gos").
// Array [gosArray] elements can be set in the inspector.
public            GameObject[]    gosArray = new GameObject[ 4 ];
public static     int             frameCounter = 0;

// Initialization:
void Start()
{
    for( int i = 0; i != 4; i ++ ) {
        gosArray[ i ] = GameObject.FindGameObjectWithTag( "Fly" + ( i + 1 ).ToString() );
        gosArray[ i ].SetActive( false );
    }

    gosArray[ 0 ].SetActive( true );
}

void Update() {
    gosArray[ frameCounter ].SetActive( false );
    frameCounter = ( frameCounter >= 4 - 1 ) ? 0 : frameCounter + 1;
    gosArray[ frameCounter ].SetActive( true );
}

I apologize for any errors, this question was answered using my smartphone.

Added other empty game object and attached source code to it. thanks friend