I've done this before.
Basically, you want to set up at least two pages for each "eyeball" - one with a Red graphic and one with a Blue graphic. Let's call the Red "ON" and the Blue "OFF". Give each one its own separate switch. For the first (upper-left) eyeball, if you toggle this eyeball it will also toggle the second (upper-middle) and fourth (center-left) eyeballs, so you should use the following eventing for the Red page when the first eyeball is checked/attacked:
If Switch 1 (Upper Left Eyeball) is OFF
Turn Switch 1 ON
Else
Turn Switch 1 OFF
End
If Switch 2 (Upper Middle) is OFF
Turn Switch 2 ON
Else
Turn Switch 2 OFF
End
If Switch 4 (Center Left) is OFF
Turn Switch 4 ON
Else
Turn Switch 4 OFF
End
Then, add this exact same eventing to the Blue page.
Now, you must do similar eventing for the other switches. When the player checks/attacks the upper-middle (2) eyeball, it will also affect the upper-left (1), upper-right (3), and center-middle (5) eyeballs. So instead of 1, 2, and 4, do the eventing for 1, 2, 3, and 5 on this event.
Keep going until you've done it for all 9 eyeballs. As a quick reference:
When you hit 1: toggles 1, 2, 4
2: 1, 2, 3, 5
3: 2, 3, 6
4: 1, 4, 5, 7
5: 2, 4, 5, 6, 8
6: 3, 5, 6, 9
7: 4, 7, 8
8: 5, 7, 8, 9
9: 6, 8, 9
Grid:
1 2 3
4 5 6
7 8 9
Finally, have a Parallel Process event that checks every few frames whether all 9 switches are ON (be sure to add a Wait of a few frames at the beginning or end). If all 9 switches are ON, the puzzle has been solved.