on (release) {
_root.pink.swapDepths (3);
_root.texty.swapDepths (5);
_root.texty.heartmessage.textColor=0xCC3366;
}
You'll notice that I also used to change the color of the text inside the dynamic text field (instance name heartmessage) inside the symbol texty, assigning a hexadecimal value chosen in a shade to correspond with the color of the heart - darker pink for the pink heart, darker purple for the purple heart, etc.
Overall, this script pulls the pink heart (instance name pink) up to a depth of 3, then sets the symbol containing the dynamic text field (texty) atop it at a depth of 5, before changing the text color. You can copy-paste the script for each of the buttons for the color options, and just change the instance name being swapped to a depth of 3 (green, blue, yellow, etc.) and the hex value determining the color of the text.


