repeat terrain

In Unity I have a repeating terrain game which I convert to Flash.

I spawn a plane object (not terrain) as terrain and destroy it when it passes off camera.

Instantiate( planePrefab, new Vector3(0, 0, i), Quaternion.identity);

This works fine but when I convert it to Flash , then I cant spawn objects like above. I have spent a lot of time with games for repeating background but it looks like you cant do this when converting to Flash?

Is there a way to repeat background so it can work in Flash when I convert it?

It works if you pass variables via scripts on flashp preview.
No public vars work