When you distribute a movie on the Internet, streaming provides an immediate and satisfying experience for your users. If you don't enable streaming, your user must wait for the entire movie to download before it begins to play. A streaming movie begins playing as soon as a specified amount of content reaches the user's system. As the movie plays, the remaining content downloads in the background and appears when it is needed. Streaming can dramatically decrease the perceived downloading time.
When Director streams a movie over the Internet, it first downloads the Score data and other nonmedia information such as scripts and the size of each cast member's bounding rectangle. This data is usually quite small compared with the size of the movie's media--usually only a few kilobytes. Before starting the movie, Director then downloads the internal and linked cast members that are required for the first frame of the movie (or more frames if you have increased the number in the Movie Playback dialog box). After the movie starts, Director continues to download cast members (along with any associated linked media) in the background, in the order the cast members appear in the Score.
If the movie jumps ahead in the Score or uses cast members that are referenced only by scripts, the required cast member might not be available when necessary. If cast members are not available, the movie either ignores them or displays a placeholder, depending on how you set the streaming options in the Movie Playback Properties dialog box. In addition, if cast members are not fully downloaded and present in memory, you might get script errors, especially if you are working with 3D.
A challenge of authoring for Internet streaming is ensuring that all cast members have been downloaded by the time the movie needs them. To avoid missing cast members, make sure that all the cast members required for a particular scene have been downloaded before beginning the scene. You can use the Director behaviors to wait for media in certain frames or for particular cast members. For more information, see About streaming with the Score and behaviors. You can also write custom scripts to do this. See Checking whether media elements are loaded with Lingo or JavaScript syntax.
Director movies stream automatically if the Streaming playback option is set to ON (its default setting is OFF). In addition to turning streaming off and on, you can specify that the media elements for a certain number of frames must finish downloading before the movie starts playing.
You control streaming movies by arranging sprites in the Score and controlling the movement of the playhead either with the Director behaviors or with Lingo or JavaScript syntax. You can also use these scripting methods to specify when externally linked files are downloaded.