Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411516 Posts in 69380 Topics- by 58436 Members - Latest Member: GlitchyPSI

May 01, 2024, 07:35:00 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Massive flash security problem
Pages: [1]
Print
Author Topic: Massive flash security problem  (Read 1215 times)
Kekskiller
Guest
« on: July 23, 2010, 04:00:51 AM »

Well, I found a way to cope with actionscript3 and wrote a little music player. I can load graphics files and such, but loading files using an URLLoader doesn't work cause of flash's policy system. What I'm working on is an audioplayer that reads it's playlist from an external XML file in the same folder as the swf file. I'm loading the sound files specified in the playlist using the Sound class and will then, while playing compute the Spectrum of it using computeSpectrum. So all three things (urrloader, sound, spectrum) require policy thing I just can't adjust to the right way. Loading sounds works, the rest not.

I'm using the mxmlc command line compiler on linux.

What I tried so far:
- using Security.allowDomain("*");
- making a crossdomain.xml in the folder I'm loading from (on dropbox)
- using "-use-network=true/false" in all variants

Without commandline options, it works locally on the filesystem but not uploaded to dropbox. Sandbox type varies between localWithFilesystem and localWithNetwork.

So yeah, I'm out of ideas. Though I definitely need to get this working til sunday Undecided
« Last Edit: July 23, 2010, 04:10:20 AM by Kekskiller » Logged
Draknek
Level 6
*


"Alan Hazelden" for short


View Profile WWW
« Reply #1 on: July 23, 2010, 04:16:27 AM »

If you're loading files from a website, crossdomain.xml must be in the top-level directory for that website, e.g. http://www.dropbox.com/crossdomain.xml

You can't do that on Dropbox, so if you want to load files from a website you'll need a different host (possibly you'll need to get your own hosting).
Logged

Kekskiller
Guest
« Reply #2 on: July 23, 2010, 04:18:40 AM »

Ah, ok. Thanks for that. And what is if I want to load it from the files domain? Guess I just need to specify the filename as URL. Shouldnt it work if I use "-use-network=false" and just upload it to Dropbox and thus it's the file's domain with crossdomain.xml-less access?
« Last Edit: July 23, 2010, 04:23:21 AM by Kekskiller » Logged
agj
Level 10
*****



View Profile WWW
« Reply #3 on: July 24, 2010, 09:57:54 AM »

I don't know what -use-network is, but if the SWF and the file you're loading are in the same domain there's no problem.
Logged

Kekskiller
Guest
« Reply #4 on: July 24, 2010, 10:08:40 AM »

-use-network is a command line option for mxmlc, the Flex command line compiler (I feel geeky saying this). It all worked well this way, using -use-network I mean. I somehow screwed up the policy stuff by mixing all kinds of policy settings here and the result was some pretty weird allow/disallow stuff. Problem solved.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic