Detailed instructions for use are in the User's Guide.
[. . . ] Developing Media Applications
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. [. . . ] For more information about video, see Chapter 4, "Working With Media Files. "
About creating Video objects dynamically
You can add Video objects to your application only from within the Flash authoring environment, by dragging an embedded Video object from the Library panel to the Stage. However, if you want to implement video objects from within your ActionScript code, you can do so by embedding them in a movie clip. This technique lets you create and remove video objects dynamically using the duplicateMovieClip() and removeMovieClip() methods.
Understanding frame rates
If you embed an FLV file in a Flash application in a static SWF file, its frame rate will be the same as the frame's playback rate in the timeline. When you stream the data in an FLV, the video played through Flash Media Server can have a different frame rate than the SWF that contains it. For example, suppose you use another application to output a Broadband FLV file with a 15 fps frame rate. If you import this FLV file into a 6 fps Flash application (SWF file), then the video will not be synchronized, because the two frame rates are different. However, if instead you use Flash Media Server to stream the FLV file into the same 6 fps SWF file, it will be synchronized to 15 fps, because streaming files do not use frame-based playback.
56
Using Media Classes
CHAPTER 4
Working With Media Files
Macromedia Flash Media Server lets you deliver a broad range of media experiences. This chapter includes information about creating live web-event broadcasts, customizing stream delivery for individual clients, and MP3 publishing and playback.
4
Working with video
Flash Media Server lets you stream live and recorded video to Flash Player clients. Several features make Flash Media Server powerful for video delivery. Edge servers let you create large-scale live web events by distributing the server load. Custom stream delivery lets you treat clients as individuals. You can deliver streams based on Flash Player version. With a little extra code, you can also deliver streams based on client bandwidth.
About creating live web events
Flash Media Server application clients can publish a live video stream to the server and multiple clients can subscribe to the broadcast. If you need to hold a large live web event, with a large number of subscribers receiving the live broadcast, subscribers can connect to the live stream through proxy servers (also called edge servers). An edge server manages data traffic from an origin server so the origin server can broadcast to a larger number of customers. For more information about edge servers, see Using Flash Media Server Edge Servers.
57
Customizing stream delivery
You can use the Flash Media Server custom stream delivery feature to provide the best streaming experience for each client by serving different versions of the same stream to different clients. For example, you can provide video encoded with the Sorenson Spark codec to clients with Flash Player 7 and video encoded with the On2 VP6 codec to clients with Flash Player 8. You can also provide video encoded at different bit rates based on the bandwidth of the client. Flash Media Server has two features that work together to let you deliver custom streams: virtual directories and virtual keys. You can create multiple directories on the Flash Media Server and store different versions of the same video content in each directory (for example, a video encoded with different codecs or at different bit rates). Each client that connects to the Flash Media Server is given a virtual key (stored in the server-side Client. virtualKey property). By default, the virtual key is based on the value of the client's Flash Player version. [. . . ] This makes it easier for them to address that issue. The following is an example of a simple comment for a variable:
var clicks:Number = 0; // variable for number of button clicks
Block comments are useful when a comment contains a large amount of text:
/* Initialize the clicks variable that keeps track of the number of times the button was clicked. */
Some common methods for indicating specific topics are:
// :TODO: topic
Indicates that there is more to do here.
// :BUG: [bugid] topic
Shows a known issue here. The comment should also explain the issue and give a bug ID if applicable.
// :KLUDGE:
Indicates that the following code is not elegant or does not conform to best practices. [. . . ]