ComputeSpectrum - Violations and crashes
Working with ComputeSpectrum method is AS3 gives a lot of funny sound things but it also brings to top one of the worst ennemies of developers, that f**king sandbox security violation… Some facts: try to catch Computespectrum sound in your animation and run a Youtube video or anything containing flash sound in the same browser. Two options: you’ve got Flash debugger installed, an error alert appears and that’s it, no more sound animation. You don’t have Flash debugger, the error occurs anyway but you don’t see anything (but the hidden flashlog knows).
I’ve spent a few hours looking for a way to proceed. Unfortunately, seems like there’s no distinction between the several movies played in the browser. Everything goes to the same global “channel” and there’s no need to set domain things or policy and allowed files. You just get an error, even if the played files are in the same folder…
What can I do ?
Obviously, you can try to catch the error.
try{
SoundMixer.computeSpectrum( spect );
} catch ( e:* ) {
// here is the error, but you cannot avoid it.
}
What else ? I don’t know. Is that an expected behaviour or just a future Flash 10 technote ? I hope so.
(This post can be a good way to collect info about that point. Any ideas appreciated)


1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]