The basic idea is:
The random numbers that you get from the random number generator depend on the initial number that is used to seed it. If you start with the same seed then you get the same sequence of "random" numbers every time.
You take a random number generator that lets you specify a seed. You give it a random seed and then generate your level. Generate a random x position for an object, generate a random y position for an object, generate a random number of enemies, etc. You save the seed for later. When you want to recreate that same level, you just use reseed the random number generator with the stored value and create the level again. Same random numbers = same layout.
Here's an example using the RandomPlus plugin:
randomSeedExample.capx