I can't set a Perticle's Alpha Value

I am trying to dynamically adjust the alpha value of particles in a particle system in the indie version of [Unity 2.6.1f3].
My C# code to do this is as follows:

Particle[] bits = myParticles.particleEmitter.particles;
for(int itor = 0; itor < bits.Length; itor++){
	if(bits[itor].color[3] != closeFrac*maxAlpha){
		bits[itor].color = new Color(bits[itor].color[0] ,
			bits[itor].color[1], bits[itor].color[2],closeFrac);
	}
}

Variables:
“myParticles” is a GameObject with an Ellipsoid Particle Emmitter and Particle Renderer attached.The Particle Animator has been omitted because the RGB values I set on Emit() need to be preserved.
“CloseFrac” is a float between 0 and 1 indicating how transparent I want the particles to be at this given frame based on camera to particle center distance. I have put Debug.Log statements in the program to verify that “closeFrac” is moving between 0 and 1 over the course of the program.

The results:
The particles remain at their starting alpha value regardless of the value of “closeFrac” .

EDIT
Thanks to Eric I have found and fixed the error.

Particle[] bits = myParticles.particleEmitter.particles;
for(int itor = 0; itor < bits.Length; itor++){
	if(bits[itor].color[3] != closeFrac*maxAlpha){
		bits[itor].color = new Color(bits[itor].color[0] ,
			bits[itor].color[1], bits[itor].color[2],closeFrac);
	}
}
	// added to fix the problem
myParticles.particleEmitter.particles = bits;

Are you assigning the particles back to the particle emitter?

–Eric

Eric: How do I set the particle back to the emitter? I have tried:

myParticles.particleEmitter.particles[itor].color = new Color(bits[itor].color[0] ,
 					bits[itor].color[1], bits[itor].color[2],closeFrac*maxAlpha);

but got the same result. Do I have to generate a new Particle and assign it to “myParticles.particleEmitter.particles[itor]”?

See the docs: http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter-particles.html

–Eric

Thanks Eric I had visited that page a dozen times today, but every time I seem to have skimmed over the note and that one important line of code. It is working fine now. I will update my original post to reflect the fix.