The option to publish multiple bitrates is in your encoding software, often Flash Media Live Encoder if you're not using a dedicated hardware solution.
In FMLE3, the setting is in the 'Encoding Options' tab under the 'Video' section; right beneath 'Input Size' you should see a collection of fields labeled 'Bit Rate', of which you can check up to three.
However, this still leaves you with the problem of how to specify where you're publishing each of your streams, since you're only given a single edit box to type in your destination stream name. The solution for this is found at http://help.adobe.com/en_US/FlashMediaLiveEncoder/3.0/Using/WSA7473A4B-12E2-4d43-A70F-2949CD87732F.html:
Under the Preset menu, select an option for multi-bit streaming for
either VP6 or H.264 video, if desired. Otherwise, enter your own
custom encoding values. Under Bit Rate and Output Size, the values for
each stream are numbered 1-2 or 1-3. The numeric value is the index of
the encoded stream. You can use this index value, represented as %i,
in the stream name and filename as a differentiator. Other parameters
are available as well. Under Output, specify a stream name and
filename. When encoding multi-bit rate streams, you can either use
semicolons to separate unique stream names or you can use a single
stream name with parameters. For the filename, you can use parameters
to differentiate the streams. Note: For the stream name, if you use
both semicolons and parameters, the parameters are ignored.
So, to achieve a set of MBR streams like the ones you specified in your code, you can specify your collection of MBR streams as either:
livestream%1
or:
livestream1;livestream2;livestream3
When you have all the MBR checkboxes checked, and the stream name specified to include all of the streams you're broadcasting, you'll be able to use code like you provided to provide a player with enough data to switch between streams.