You can use a custom .hxml file to build your project in FlashDevelop. Go to Project -> Properties.... Choose Custom Build as compilation target. Go to the Build tab and insert the following line in the Pre-Build Command Line field (assuming you named your build configuration compile.hxml and placed it in the root of the project directory):

$(CompilerPath)\haxe.exe $(ProjectDir)\compile.hxml

Click OK. Whenever you compile, test or run, FD will use your hxml file. You can even edit .hxml files within FlashDevelop.

It is nice to have the dropdown menu in FlashDevelop to select between "debug" and "release" change specific things about the compilation. This is as as simple as creating two versions of your .hxml file, called debug.hxml and release.hxml, and, in your project properties, setting the pre-build step to:

haxe.exe $(BuildConfig).hxml

You can then make your code behave differently using the "#if debug" conditional compilation command.You can also make three files, naming one after your project, to contain all shared options, and again debug.hxml and release.hxml to contain only the options that will change between those build configs. Then in the pre-build step, since Haxe allows you to specify multiple config files, you can have:

haxe.exe $(BuildConfig).hxml $(ProjectName).hxml

So, for a flash build target, release.hxml might contain:

# Parameters that should only be set if we're compiling for release.
--no-traces

And debug.hxml might contain:

# Parameters that should only be set if we're compiling for release.
-debug
-D fdb
#-D advanced-telemetry