yeah, well it's complicated and I still haven't managed to get a working x3g file yet.
there are a couple of threads around.

basically you insert custom gcode for the start and end for the program to use (slic3r generally - not sure it works with cura) you then run that through gpx and that generates an x3g file. This file should then work on your flashforge.
It doesn't on mine and I've had all sorts of weird results.

Oh yeah - you're also supposed to update your firmware to sailfish ? swordfish ? marlin ? some kind of big game fish anyway - I've yet to find anything on the machines settings or makerware that mentions a type of fish - so have no idea how people know what they're running. I've also not managed to get that to work yet either :-)
I think I'm still running haddock.