602
Working with Images, Sound, and Video
Because ID3 2.0 tags are located at the beginning of an MP3 file (before the sound data), they
are available as soon as the file starts downloading. ID3 1.0 tags, however, are located at the
end of the file (after the sound data), so they aren’t available until the entire MP3 file finishes
downloading.
The
onID3
event handler is called each time new ID3 data is available. So, if an MP3 file
contains ID3 2.0 tags and ID3 1.0 tags, the
onID3
handler is called twice because the tags are
located in different parts of the file.
For a list of supported ID3 tags, see
id3 (Sound.id3 property)
in the
ActionScript
2.0 Language Reference
.
You can find a sample source file that loads MP3 files, jukebox.fla, in the Samples folder on
your hard disk. This sample demonstrates how to create a jukebox by using data types, general
coding principles, and several components:
■
In Windows, browse to
boot drive
\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\Components\Jukebox.
■
On the Macintosh, browse to
Macintosh HD
/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/Components/Jukebox.
Assigning linkage to assets in the library
You can assign linkage identifiers for assets in the library, such as movie clips and font
symbols. In Flash Basic 8 and Flash Professional 8, you can set linkage identifiers to sound
and image assets in the library. This supports using image and sound files with shared libraries
and with the new BitmapData class.
The following example adds a bitmap image in the library with a linkage set to
myImage
.
Then you add the image to the Stage and make it draggable.
To use linkage with bitmap files:
1.
Create a new FLA file called
linkBitmap.fla
.
2.
Import a bitmap image to the library.
3.
Right-click (Windows) or Control-click (Macintosh) the image in the library, and select
Linkage from the context menu.
4.
Select Export for ActionScript and Export in first Frame and type
myImage
in the
Identifier text box.
5.
Click OK to set the linkage identifier.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...