Embedding Sound with Flash, Part IV: Native JavaScript - Doc JavaScript
Embedding Sound with Flash, Part IV: Native JavaScript
In this column we continue our series on embedding sound with Flash. We presented the basics of Flash and the FlashSound JavaScript API in Column 81, Embedding Sound with Flash, Part I: The Basics. We extended our coverage to multiple tracks and the interaction between them in Column 82, Embedding Sound with Flash, Part II: Playing Variations, and we concluded our coverage of the FlashSound JavaScript API in Column 83, Embedding Sound with Flash, Part III: Streams. In this column, we turn our attention to native JavaScript support of Flash. With native JavaScript support, you can access all Flash methods and properties, independent of a pre-defined API which naturally cannot duplicate the wealth of features that Flash supports. The drawback is that you have to take care of all of the tiny details that need to be implemented before you start playing a Flash track.
In this column we'll show you the basic stuff that any API does. You'll learn how to check if the browser is compatible with Flash, whether Java is enabled, and if the Flash player is installed. We'll show you how to check for the player's existence in both Internet Explorer where it is implemented as an ActiveX control, as well as in Netscape Navigator where it is implemented as a plugin. We show you how to embed a SWF, and how to create a Flash object. We'll demonstrate a couple of Flash methods with the Animalsounds track. We'll then focus on embedding sound in a Web site. We'll teach you how to create an invisible frame, and how to share its SWF tracks among all pages, without embedding the tracks in each and every page. This is a good solution for maintaining a Web site that uses sounds extensively.
In this column you will learn:
- How to check the browser compatibility
- How to check the Flash player
- How to embed a SWF
- How to use a Flash method
- How to use an invisible frame
- How to share sound tracks among Web pages
You can download the Flash Player, the Flash Embedding JavaScript include file, and the animalsounds SWF example. You can also find these files in one zipped file.
Next: How to check the browser compatibility
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: May 21, 2001
Revised: May 21, 2001
URL: https://www.webreference.com/js/column84/index.html