If you need to dynamically refer to different instances in different families, with different IIDs on different layers and dynamically change the properties of other such, properties according to layer parallax, andreyin's method just doesn't cut it.
One of the reasons being that you can't really connect that pre-set variable neither to the layer nor the objects in it as values.
Sprite.LayerNumber instantly gets you a layer number.
Set Layer Parallax(Sprite2.LayerNumber) to Layer(Sprite1.LayerNumber).ParallaxX, would instantly set the Parallax of one Sprite to that of another.
With your method you first have to check which layer the first Sprite is on it is, and then match the layer number to the variable that contains the layer's parallax(more complicated than it sounds), then set Sprite2's Layer's parallax to that.
If you do this all the time eventually you just lose track of the whole process.
It just gets too complicated and gimmicky.