Managing Memory
565
Preloading digital video
It is recommended that you do not preload digital video cast members. Digital video is played by
streaming the video file from a disk. As the file is streamed, it is decompressed into memory one
section at a time. Preloading a digital video file causes the entire file to be decompressed into
memory at once, which can cause low memory situations on most computers.
You can cause a digital video to preload only its first segment without consuming unnecessary
memory by placing it in the Score a frame or two before it is actually needed.
To preload a digital video safely:
1
Add a sprite of the digital video to the Score.
2
Begin the sprite one or two frames before the frame where you want to display the video.
3
Locate this sprite off the Stage except for at least one pixel of one corner of the sprite. This is so
the user won’t notice it.
4
Set the sprite’s
movieRate
property to 0, which prevents the movie from playing when
first loaded.
5
In the frame where you want the video to appear, use Lingo to set the sprite’s
loc
property to
place the sprite on the Stage in the location you select.
6
Set the
movieRate
property to 1 to start playing the video.
This way, the video will load its initial segment into memory and is ready to play immediately
when your movie reaches the frame where you want it to appear. Experiment with preloading the
video a few frames earlier if you find that preloading has not yet finished when your movie
reaches the frame where the video appears.
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...