Windows Media Services SDK banner art
PreviousNext

About the Flash Sample

Playback of the Macromedia Shockwave Flash animation is controlled by playback of Sbnflash.asf. The two main elements on the page are Shockwave Flash and Windows Media Player. As Sbnflash.asf is played, Windows Media Player sends script commands at important synchronization points to the Web page. A ScriptCommand event is generated and a control command is sent to the Shockwave Flash object. For example, if the script command type string is "text" and the command string is "start", the Shockwave Flash Play method is invoked:

EVENT="ScriptCommand(ScType, ScCmd)">
   if(navigator.appName == "Microsoft Internet Explorer"){
       if (ScType == "text") {
           if (ScCmd == "start")
               parent.SWFlash.Play();
           else if (ScCmd == "pause")
               parent.SWFlash.Stop();
           else if (ScCmd == "resume")
               parent.SWFlash.Play();
           else if (ScCmd == "stop") {
               parent.SWFlash.Stop();
               parent.SWFlash.Rewind();

Even though Macromedia Shockwave Flash animations are usually created as stand-alone files, there are times when you can enhance your presentation by taking advantage of the streaming audio and video capabilities available with Windows Media Services. Shockwave Flash content is played back as it is downloaded from a standard HTTP server. While that type of server is fine for text, animations, and graphics, a server running Windows Media Services can specifically handle the special needs of streaming media. By using Shockwave Flash to handle graphic elements and animation downloaded from an HTTP server, and Windows Media Services to handle streaming audio and video, you help ensure that playback is smooth and of the highest quality.

File size is also a consideration when playing a Shockwave Flash file. Shockwave Flash does a good job with many graphics, interactive elements, and short sound chunks. But in a 30-minute presentation, for example, consider using Windows Media Services to handle the audio and Shockwave Flash the playback of short animation sequences. Use Shockwave Flash audio for handling short sounds attached to screen click events; use Windows Media Services for long, produced tracks.

Expanding on this Sample

The following examples show how you can expand on the Flash Sample by modifying ASF content and the HTML file included in this SDK.

For more information, see Enhancing ASF content in the Windows Media Tools Documentation, and the Windows Media Player Control SDK.

See Also

Using the Flash Sample, Windows Media Technologies Solutions Samples

PreviousNext


© 1996-1999 Microsoft Corporation. All rights reserved.