 |
 |
   |
 |
|
| Flash
MX 2004 Pro MediaPlayback Component |
 |
 |
Introduction
This example demonstrates the practical
use of the default library of components
available in Macromedia Flash MX 2004 Pro,
including a draggable MediaPlayback Component! |
 |
| Contents
|
 |
 |
| Getting
Started |
 |
Components are quick and easy to implement,
and may even serve to help save your project
from an impending deadline. Unfortunately,
Flash's native components are still somewhat
quirky, if not buggy, and making them behave
more 'intelligently' can result in some
very messy ActionScript code.
The goal was to develop context-sensitive
interaction between various components
so that they could behave more intelligently
to user feedback. In this example, these
'intelligent' components are used to playback
either .FLV movie or .MP3 audio files.
|
 |
|
|
 |
 |
| Testing
your streaming media files |
 |
Because the Flash MediaPlayback Component
can stream the media, you will notice that
playback begins almost immediately; particularly
for .FLV movie files. Conversely, the Flash
Player must download a significant chunk
of an .MP3 audio file before playback can
begin.
You can use this example to test your streaming
media files either from a remote URL/location,
or browse for media files stored locally
on your computer system.
You are welcome to take advantage of this
example as a handy referencing utility
to validate your media file URL's and to
simulate download times. |
 |
|
|
 |
 |
| Known
issues and limitations |
 |
Example
1
Example 1 does not yet include validation
of the media; i.e, whether or not any
given URL/location (remote or local)
has a valid input stream.
Also, in order to browse for media files
that are stored locally on your computer
system, you must run this example embedded
within its host HTMLdocument. You can
download an archive of the example including
the HTML document from: http://www.grabtv.tv/examples/components_1.zip
Furthermore, if the Alert Component is
overlapping the MediaPlayback Component,
both can be dragged simultaneously.
Lastly, there is an audible 'hiccup'
that occurs when loading .MP3 audio files--but
only at the very beginning of playback
of the file. The reason for this is described
below under 'Notes and Considerations'.
Example
2
There is a to-do list for Example
2:
- Validation of the Media URL
- A More Accurate Loading Message
- Animated Visualization Effects for
.MP3 Audio Playback
Any useful code, tips, references, or
feedback that helps contribute to this
example would be more than welcome and
greatly appreciated! *wink*
|
 |
|
|
 |
 |
| Notes
and considerations |
 |
For some reason, the current
version of Flash MX 2004 Pro will not allow
you to get ID3 Tag information from the
MediaPlayback Component!
Normally, you can retrieve the ID3 Tag
information from your Sound Object as follows:
mySoundObject.id3.[attribute];
...One might naturally presume, then, that
the Media Object might behave in the same
manner, assuming that an .MP3 audio file
has been loaded into said Media Object;
i.e.:
myMediaPlaybackObject.id3.[attribute];
//assuming that an .mp3 audio file has
been loaded
...However, this is not the case. I would
certainly hope that this was an oversight
on my part, and not the fault of the developers
at Macromedia.
The next idea, logically, was to make the
Media Object itself a Sound Object using
the on(load) event handler for the MediaPlayback
Component as follows:
on(load) {
mySoundObject = new Sound(this);
}
...Perhaps then, I could use the original
mySoundObject.id3.[attributes] to retrieve
the ID3 Tag information from the .MP3 audio
file. Well...no such luck.
But I wanted the user to have this feature,
so my only solution was to create both
a Sound Ojbect AND use a Media Object at
the same time. Tisk! Such a waste! But
this was the only way to get the ID3 Tag
information from an .MP3 audio file.
Needless to say, this will be on my wish
list of features for the next version of
Flash/MX! |
 |
|
|
 |
 |
This tutorial was written by Lincoln
Berry III, an independent technical
consultant, web contractor,
IT training professional, and the inventor
of GrabTV. |
|
|
 |
   |
| |
| ©2007
Wildform, Inc | Policies | Contact
Us | Newsletter
Options |
| |
|
| ©2008 Wildform, Inc | Policies | Contact
Us | Newsletter
Options |
| |
| Wildform
provides a 100% satisfaction guarantee on all our Flash software.
If you are not completely satisfied with our Flash multimedia software
for any reason you may request a refund within 15 days
of purchase.
|
|
|
 |
 |
|