Creating Enhancement Announcements

[This is preliminary documentation and subject to change.]

Adding an announcement event to the stream is the first part of creating an enhancement announcement. This is demonstrated in the following example:

e.Text = "00:00:00.50 announce ( ""MyAnnc.ann"" ) ;"
 

Note that the announcement event references a file, in this example MyAnnc.ann. This file is a text file that contains the announcement's field and attribute values. By convention, announcement files use the .ann file extension. Before you can broadcast an announcement to the client, you must generate such an announcement file.

The stream compiler object library provides an object, Annc, that your application can use to create and edit announcement files.

    To create an announcement file
  1. Create an instance of an Annc object.
  2. If you want to edit a pre-existing announcement, use Annc.Load to read the announcement's properties into the Annc object. If you are creating a new announcement, skip this step.
  3. Set the object's properties to reflect the field values you want to set in the announcement. For more information about the properties available see, Annc.
  4. Save the announcement to a file using Annc.Store. This persists the announcement to a text-based .ann file that can then be transmitted to broadcast clients.

Similarly, you can also use the files generated by the Annc object to transmit delete announcements. Delete announcements rescind previously-transmitted announcements. The following example illustrates creating a delete announcement event that undoes the announcement event of the previous example.

e.Text = "00:00:00.50 delannounce ( ""MyAnnc.ann"" ) ;"