[ Pobierz całość w formacie PDF ]
.The animation still requires as much processor overhead as before, but the Java runtime system makes sure other threads get a shot at the processor, too.The Media TrackerThe Java media tracker is another unique feature of Java that aids in supporting multimedia on the Web.The Java media tracker is a class that provides a mechanism for keeping up with when multimedia content has been successfully transferred over a network connection.The need for the media tracker goes back to the issue of bandwidth discussed earlier in this chapter.Because it sometimes takes a considerable amount of time to transfer multimedia content over an Internet connection, Java multimedia applets desperately need to know if and when the content is available to use.The media tracker solves this problem by providing Java applets a means to track when multimedia objects have finished loading.The media tracker was used in a practical sample applet in Chapter 25, “Animation Programming.”Future of Java and MultimediaProbably much more important than the present state of Java multimedia is what the future holds.There are so many emerging multimedia technologies related to or based on Java that it is difficult to see which ones will brave the storm and which will just fade away.One thing is for certain: The future of Java and multimedia holds both a lot of uncertainty and a lot ofpromise.ShockwaveIn this section, you'll take a close look at one of the more promising multimedia technologies that promises to provide some degree of Java support: Macromedia's Shockwave technology.In short, Shockwave is a new technology developed by Macromedia that allows Macromedia Director movies to be embedded in Web pages.Shockwave is distributed in the form of a Web browser plug-in.Currently, Shockwave is supported by Netscape Navigator 2.0 for Windows 3.1, Windows 95, and Macintosh.It is expected to soon be supported by other browsers.To understand the impact a technology like Shockwave could have on the Web, you must understand what Macromedia Director itself is all about.Macromedia Director is a leading multimedia development tool, originally developed for the Macintosh and later released for Windows 3.1, that provides a powerful movie paradigm and graphical approach for creating interactive multimedia presentations.Multimedia developers use Director to control the choreography and coordination among images, sound, video clips, and other media types to create a complete multimedia movie.The approach is similar in theory to a director coordinating actors, props, and a soundtrack when creating a motion picture.Creating a Shockwave MovieThe process of creating a Shockwave movie begins by first creating the movie using Director as if it were a standard Director movie.Once the movie is working well under Director, it is processed by Afterburner, which is a tool distributed with Shockwave that compresses the movie into a form more suitable for the Web.The resulting compressed movie is then embedded in a Web page as multimedia content.In Netscape Navigator 2.0, a Shockwave movie is embedded like this:<EMBED SRC=”path/file_name.ext” WIDTH=n HEIGHT=n TEXTFOCUS=focus>The WIDTH and HEIGHT arguments specify the width and height of the movie window, in pixels, and TEXTFOCUS tells the Shockwave plug-in when to respond to input from the keyboard.Possible TEXTFOCUS settings include focus, onMouse, onStart, and never.If the user's browser doesn't support the Shockwave plug-in, the NOEMBED tag enables you to substitute a JPEG or GIF image in place of the movie, like this:<NOEMBED> <IMG SRC=”path/file_name.ext”> </NOEMBED>Shockwave and JavaDeciding when to use new technologies such as Shockwave, as opposed to developing your own classes in Java, is often difficult.There are no hard rules governing when to use certain technologies over others.All you can hope for is a future integration and convergence of technologies, which would allow more options for multimedia developers.For example, Macromedia has shown a serious interest in Java.In fact, they have even promised some degree of Java support in future releases of Shockwave.What this will mean to the Java multimedia programmer isn't yet clear, but there is certainly the potential for a leveraging of high-level multimedia development tools with custom Java code.Getting Shockwave InformationTo get the latest information regarding Shockwave, check out Macromedia's Web site at.You can also take a look at the Director Web at , which is a good place to go for examples of Shockwave movies and technical details showing how commands are used.SummaryAs a multimedia technology, Java is still in its infancy.Although it currently supports some interesting multimedia features such as graphics, imaging, basic sound, and media tracking, it is still lacking in many ways.This situation really is to be expected, because the Web community in general has yet to figure out the best approach to take in handling distributed multimedia.There are many problems to be solved before any technology can successfully deliver a widely distributed multimedia solution.However, even in its young state, Java is quickly positioning itself as the driving multimedia technology for the Web.Java, however, isn't alone.There are other technologies aiming to solve many of the multimedia problems facing the Web as well.One of these technologies, Macromedia Shockwave, which is based on the popular Macromedia Director multimedia authoring tool, actually shows signs of supporting some degree of integration with Java.This mixture of Java and new third-party technologies will more than likely pave the way for the future of multimedia on the Web.Either way, there doesn't appear to be much doubt that Java will play a key role in the evolution of multimedia on the Web.Chapter 34VRML and JavaVirtual Reality Modeling Language (VRML) is a way to describe virtual worlds on the Web, just as HTML describes Web pages.Soon, having a home page on the World Wide Web will not be enough.You'll need your own home world (home.wrl) as well! As Java becomes integrated with VRML, you'll be able to write Java scripts to animate and enliven VRML worlds
[ Pobierz całość w formacie PDF ]