You can do the floor-tile part of this puzzle using a two-page event on every applicable tile. Each tile will need a separate switch associated with it. You will also need a variable to associate with the puzzle. The first page of the event should be a blank tile (since the floor will already be below the event). It should be "Below Hero" and "On Hero Touch". When the hero touches this event it should turn on one of the aforementioned switches, activating the second page of the event, and also increase the value of the variable by one. The second page of the event should be activated by the switch being turned on, and it should be a tile with the cracked floor graphic (or whatever it is you want to have indicating that the tile was already stepped on). It should also be "Below Hero" and "On Hero Touch". If the hero touches this event, you should do whatever it is you want to have happen when the player fails the puzzle. You should also turn ALL the switches associated with the event OFF and set the variable back to 0.
You will also need a two-page event for the door that is blocking the hero from continuing. The first page of this event should be the door (or wall or whatever) and should obviously be set to "Same Level As Hero". It does nothing. The second page of this event should be blank and "Below Hero" because obviously the hero needs to be able to get passed it. It should be set up to activate once the variable reaches the value equal to the total number of floor tiles you have in the puzzle (since that'll mean that every available tile has been stepped on).
Lemme know if you have any problems.