*blog... kind of... *rss 



Oooh... Sandbox sandbox, what a shame...
I've spent a lot of hours today trying to do something that I thought it was going to be quite easy. While I was doing the Effect01 of the audioVisualizations I realised that testing different mp3s on it just to see how the visuals were going to react was actually very fun. After a couple of mp3 tests I found out that there was something else, the experiment was showing me parts of the tune that I never paid attention before. So I had the idea to make it 'public', so anyone could test it with their own mp3s and have some fun too.

Easy concept, same experiment but with a inputBox where you paste the link to the mp3. Unfortunately I wasn't aware of flash sandbox limitations on that matter. Apparently you can't load mp3's from other servers that doesn't have the policyFile.xml.

I know that you could do a php script to jump the sandbox, but this would mean a lot of bandwidth on my server, which I don't fancy right now :P

This is how I left the project:
http://mrdoob.com/lab/PV3D/vis/effect01/custom/

In fact, if you try it with a link to some MP3 (you can find a lot here), the swf loads the tune, you can listen to it, but the ENTER_FRAME stops and if you're running the debug version of the player it warns you with the limitation.

Do you know any solution for this besides the php script?
6 comments

Same thing happens with BitmapData... you can load and show any image, but you can't read the pixel info if it's on another domain. I think its BS... and I have no idea how this could improve security.
Yeah, I did read about that somewhere. I with Adobe/Macromedia justified why they introduce each limitation.
Oh! I got and idea but I'm not too sure how will it work. Using htaccess.

You tell flash to load something in your server, like
http://myserverrulez.com/getfile?server=anotherserver.com&file=/directory/filename

Then in the htaccess you add a redirect so that each time your server gets that request, you actually forward the script to another place (which is the actual one).

Would it work?
and I broke your layout... oh well... O:)
Or maybe you didn't ;) I just added to the code the function I did for xplsv.tv's comment parsing.
That solution sounds interesting, we could try it this evening ;)