User Guide

476 Flash Player Security
You can use the SoundMixer.areSoundsInaccessible() method to find out whether a call
to the
SoundMixer.stopAll() method would not stop all sounds because the sandbox of one
or more sound owners is inaccessible to the caller.
Calling the
SoundMixer.stopAll() method stops those sounds whose owner sandbox is the
same as that of the caller of
stopAll(). It also stops those sounds whose playback was started
by SWF files that have called the
Security.allowDomain() method to permit access by the
domain of the SWF file calling the
stopAll() method. Any other sounds are not stopped,
and the presence of such sounds can be revealed by calling the
SoundMixer.areSoundsInaccessible() method.
Calling the
computeSpectrum() method requires that every sound that is playing be either
from the same sandbox as the object calling the method or from a source that has granted
permission to the caller's sandbox; otherwise, a SecurityError exception is thrown. For sounds
that were loaded from embedded sounds in a library in a SWF file, permission is granted with
a call to the
Security.allowDomain() method in the loaded SWF file. For sounds loaded
from sources other than SWF files (originating from loaded MP3 files or from Flash video), a
cross-domain policy file on the source server grants access to data in loaded media. You cannot
use the
computeSpectrum() method if a sound is loaded from RTMP streams.
For more information, see Author (developer) controls” on page 460 and “Website controls
(cross-domain policy files)” on page 456.
Accessing video data
You can use the BitmapData.draw() method to capture the pixel data of the current frame of
a video.
There are two different kinds of video:
RTMP video
Progressive video, which is loaded from an FLV file without an RTMP server
You cannot use the
BitmapData.draw() method to access RTMP video.
When you call the
BitmapData.draw() method with progressive video as the source
parameter, the caller of
BitmapData.draw() must either be from the same sandbox as the
FLV file, or the server of the FLV file must have a policy file that grants permission to the
domain of the calling SWF file. You can request that the policy file be downloaded by setting
the
checkPolicyFile property of the NetStream object to true.