Alex, most of our samples have a basemap switcher. Is this what you are referring to? If so download one of the samples from https://github.com/Esri/arcgis-samples-flex. All, of our examples contain this code. You will need to create a drop-down list with an array of the layer URLs, and create a TiledMapServiceLayer within the map.
<esri:ArcGISDynamicMapServiceLayer url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer"/>
<esri:FeatureLayer graphicAdd="featurelayer1_graphicAddHandler(event)"
outFields="[FIPS,POP2000]"
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0"> </esri:FeatureLayer>