• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

2032 Stream Error

Guest
May 03, 2010 May 03, 2010

Copy link to clipboard

Copied

I have an app, being wrapped by SWFKit so I have file system access and some other things. It's working fine up until now - I need to load the contents of a text file, and then upload to a web service. I am consistently getting a 2032 error whenever I invoke URLLoader.load on a file. All the files I need to load and then upload are in a relative path to the Flash (.exe):

Flash file:

     \textFiles

If I do URLLoader.load(new URLRequest("textFiles/" + theFile));    I get the stream error. Seems to be a security restriction and I'm not too well versed in Flash security issues... and unfortunately don't have the time to do much research on it. Hoping someone knows the answer...

TOPICS
ActionScript

Views

727

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 03, 2010 May 03, 2010

Copy link to clipboard

Copied

you are probably correct, that is a cross-domain security issue, even though it looks like you're loading from the same domain.

add a cross-domain policy file (allowing access from localhost) to the root directory of your current directory and load it into your swf.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

Thanks kglad - I ended up just using the wrapper app (SWFKit) to read the file contents. I was having some trouble with it so I decided to try URLLoader - but I figured it out and it's working perfect now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

you're welcome.

p.s.  why aren't you creating an air file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

LATEST

Because AIR can't suppress the print dialog - and frankly I find AIR's file handling to be rather kludgy... it's much cleaner in SWFKit.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines