i am no exception.
I have created a small jukebox in AS3 with a visualization using the
computeSpectrum() method. I at first was receiving sandbox violations
requesting a policy file before it would download the mp3 needed for playback.
I looked into this matter and found a solution to add a SoundLoaderContext
object to the Sound.load() method that told the sound object to check for a
policy file before downloading. here is my challenge:
i have a tab in firefox open to youtube, on a video's page. in another tab, my
website with jukebox (including visualization). when the jukebox attemps to
compute the spectrum, i receive Error #2122 (more specifically: SecurityError:
Error #2122: Security sandbox violation: SoundMixer.computeSpectrum:
http://kingthief.com/assets/flash/jukebox.swf cannot access
http://sjc-v28.sjc.youtube.com/get_video?video_id=iRHDuMkgZ10. A policy file is
required, but the checkPolicyFile flag was not set when this media was loaded.)
these warnings prevent spectrum from operating and jukebox functionality until
warning is dismissed.
my question: why would i get sandbox violations in the jukebox for a flash app
in a different website, in a different tab? i know that flash 9 is now a VM so
they must be inherently linked, but my warning indicates i'm trying to read a
policy file from a site it is not even connecting to (or requesting from)
i'm completely stumped. help?
i will reiterate that i was receiving sandbox error #2122, but i was NOT
requesting data from an outside domain. all paths within my flash application
were relative. i simply had two firefox tabs open...one with my flash app in
it, and another on a youtube video page. Now, obviously it isn't specific to
youtube. the "other" tab could be pointed to any site with a media player
present and running on it.
i tried to further investigate this bug, but eventually abandoned using the
computeSpectrum() method all together.
is it a flash player bug? a firefox issue? i have no idea.
if the application is open and running by itself, it works like a charm. then
try to also have youtube running, refresh my app, and voila... sandbox
violation.
i have still found no help. i hope someone at adobe reads this and submits a
formal bug report.
very annoying.
The details:
"SecurityError: Error #2122: Security sandbox violation:
SoundMixer.computeSpectrum: http://www.testsite.com/myflash.swf cannot
access http://demos.immersivemedia.com/fvdemo_1/data/CylindricalFlashPlayerDemoSite/PopularMechanicsNYCDriveAlong/video.flv.
A policy file is required, but the checkPolicyFile flag was not set
when this media was loaded.
at flash.media::SoundMixer$/computeSpectrum()"
Explanatory note (for other readers trying to figure this out):
if you use soundtransform you need it to be accessing files in the
right security sandbox. if you access it in a subdirectory to your
own site, it is in the right sandbox. However, if you have another
flash-app open in another firefox-tab, these two will confuse each
other;s sandboxes. I believe this mixing up of info could be
considered a security issue, as this means I can potentially transfer
info from one flash app in one tab to another flash-app in another
tab..