"The contents of a Pokemon egg are generated when you receive it from the Daycare man. All IVs, Nature, Ability, Gender, and Moves are generated when you receive the egg." Source: http://projectpokemon.org/wiki/Pokemon_breeding
However, I'm pretty sure that the OT will be the person who hatches the egg, it is not necessarily the breeder.
So, does anyone know how "shinyness" in eggs works? Is this attribute pre-set within the egg at the moment when I collect it, or is it determined at the moment of hatching?
If the "shinyness" is pre-set inside the egg when I collect it, then in theory, the egg will hatch as a shiny, regardless of whether it is traded to another trainer in another game, right? However, if the "shinyness" is determined at the point of hatching, then the chances of the egg hatching into a shiny would be determined by my friend's game, not mine, so theoretically anything I did in my game to raise the chances of encountering or hatching a shiny Pokémon would have no effect... I was just wondering :)
I want to know because I would like to try to breed a shiny Pokémon egg as a gift for someone, then trade it to them without telling them what is inside, and then they will have a nice surprise when it hatches and it turns out to be shiny!