I have several layers on my map. I need to set minimum and maximum scale level to prevent zooming. What's the best way of implementing it?
There are multiple ways you could set an use the Minimum & Maximum Zoom levels:
As Jaimie has mentioned in the other answer, you could set the LODS for the map and then your map could only be viewed at those particular zoom Levels. This sample shows how you can set the LODs. The disadvantage of this is that yor map can only be used in particular zoom levels, and dynamic zooming into an arbitrary scale would not be possible.
You could listen to the Map's ZoomEnd event, and then stop the zooming, if it is beyond your required range.
You could set the max & minimum scale levels on the map service itself. this might not be possible in all cases, but it's the best option, since your data is not exposed at the REST endpoint itself. This is the most secure.
From what I could find and know you will want to define the Levels of Detail (LOD) for the flex application. Here is the ESRI documentation and you should look at the live sample on the page called: "Settting LODs for the map manually".
This approach will be somewhat limited as you want to align your scale levels with the levels present in the tiled basemap you are using. If you are not using a tiled basemap then You should also be able to define the min/max in your MXD so when you publish that is what is only available. That should be found in "Document Properties" if my memory serves me correctly.
So it looks like since you are not using a tiled service and do not have access to the ags services that you should probably set an initial extent on the dynamic service to be inside the scale range that you want. Then do as suggested below and listen to the zoom events and check to see if the user is within your scale. If not, then do not zoom.