ricardocabellov5.0balter-egos
trace mr.doob r08028
blogdemoscenefeaturedextrascontact
 *blog... kind of... *rss

« BeatportWeird bug in Flash pla... »

Oooh... Sandbox sandbox, what a shame...
11.02.2007
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?
posted by mr.doob at 22:11
6 comments written so far

http://www.c-trick.com/bl og/2005/10/17/24/
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.
posted by Cay
11.02.2007 , 22:26

Yeah, I did read about that somewhere. I with Adobe/Macromedia justified why they introduce each limitation.
posted by mr.doob
11.02.2007 , 22:41

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=anotherser ver.com&file=/directory/f ilename

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?
posted by sole
12.02.2007 , 13:21

and I broke your layout... oh well... O:)
posted by sole
12.02.2007 , 13:22

Or maybe you didn't ;) I just added to the code the function I did for xplsv.tv's comment parsing.
posted by mr.doob
12.02.2007 , 13:59

That solution sounds interesting, we could try it this evening ;)
posted by mr.doob
12.02.2007 , 14:01

SORRY!
Is not that I don't care about what you have to say, of course I do, but they are speaking louder and I lost my patience :(
 *profile 



traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here


 *latest posts 

* Some new Flash 10 Shaders for realtime... (01.09.2008)
* Service Pack 3 Setup Error (31.08.2008)
* FDT does work in Linux (19.08.2008)
* Sorry for the delay... (19.08.2008)
* Hi-ReS! Stats (11.08.2008)
* Björk - Hidden Place (Knick & The Ene... (09.08.2008)
* Noisia vs Religion (08.08.2008)
* Inspire08 demo log, day 117 (07.08.2008)
* Inspire08 demo log, day 116 (06.08.2008)
* Thank you for writing to Yahoo! Accou... (01.08.2008)
* Thank you for writing to Yahoo! Accou... (01.08.2008)
* Definition of FAIL (31.07.2008)
* Ronny Pries live @ Alpha Box Jan'08 (23.07.2008)
* WALL·E (23.07.2008)
* Where do we get the time from? (22.07.2008)


 *latest comments 

* C++, SDL Coding? Maybe.. ;) (Preview) (trace)
* C++, SDL Coding? Maybe.. ;) (Preview) (Joey)
* La picaresca (spt)
* Mr. Slip Up (ricardo)
* La picaresca (ricardo)
* La picaresca (spt)
* La picaresca (sole)
* Demoscene @ Cirsa (sml)
* La picaresca (humphr3y)
* La picaresca (alfio)
* fiver2's new baby: debris (Jcl)
* Barcelona = full of shit(s) (Soli)
* Demoscene @ Cirsa (Scener)
* Rar & unrar with Ubuntu (SethPlate)
* Mindcandy 2 (Jcl)


 *advertising