1

UPDATE: Any version of AIR is blocking any external content. This simple pic script won't work either.

var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("http://edvizenor.com/images/Ed-Vizenor.png"));
addChild(my_loader);

BUT HOW DO I FIX THIS?

UPDATE: More error info:

Attempting to launch and connect to Player using URL C:\Flash Apps 2014\Real Projects\Fr Letherby\Homily.swf
[SWF] C:\Flash Apps 2014\Real Projects\Fr Letherby\Homily.swf - 981 bytes after decompression
*** Security Sandbox Violation ***
Connection to http://traffic.libsyn.com/frleatherby/2015Jul18.mp3 halted - not permitted from file:///C|/Flash%20Apps%202014/Real%20Projects/Fr%20Letherby/Homily.swf
-- Untrusted local SWFs may not contact the Internet.
SecurityError: Error #2028: Local-with-filesystem SWF file file:///C|/Flash%20Apps%202014/Real%20Projects/Fr%20Letherby/Homily.swf cannot access Internet URL http://traffic.libsyn.com/frleatherby/2015Jul18.mp3.
    at flash.media::Sound/_load()
    at flash.media::Sound/load()
    at Homily_fla::MainTimeline/frame1()[Homily_fla.MainTimeline::frame1:2]
Cannot display source code at this location.

BELOW IS THE ORIGINAL POST.

I just got a new comp using windows 8 and installed creative cloud. I am using the Flash IDE and I am trying to load a sound from online. It's a simple script but I am getting this error below.

NOTE: I am using Air 17.0 for Android. It's not working. However, when I load this same script in the flash player it works.

As you can see it's a valid live link: http://traffic.libsyn.com/frleatherby/2015Jul18.mp3

But it won't play. Did abode block this streaming feature? What simple line am I missing. This was so easy before. Is it a setting on my new computer? Thanks for any tips.

package  {

import flash.display.MovieClip;
import flash.events.Event; 
import flash.media.Sound; 
import flash.net.URLRequest; 

    public class Main extends MovieClip {


        public function Main() {
            // constructor code
            var mySound:Sound = new Sound();
            mySound.load(new URLRequest("http://traffic.libsyn.com/frleatherby/2015Jul18.mp3"));
            mySound.play();
        }


    }

}

THE ERROR

Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
    at Main()[C:\Flash Apps 2014\Real Projects\Fr Letherby\Main.as:13]
    at runtime::ContentPlayer/loadInitialContent()
    at runtime::ContentPlayer/playRawContent()
    at runtime::ContentPlayer/playContent()
    at runtime::AppRunner/run()
    at ADLAppEntry/run()
    at global/runtime::ADLEntry()
[UnloadSWF] Homily.swf
Test Movie terminated.
Papa De Beau
  • 3,744
  • 18
  • 79
  • 137
  • Have you read [this](http://stackoverflow.com/questions/15106960/error-2044-unhandled-ioerrorevent-text-error-2032-stream-error) or [this](http://stackoverflow.com/questions/6507461/error-2032-stream-error) thread already? – Colonize.bat Jul 25 '15 at 23:58
  • Strangely that seems to be the kind of error you would get while using a projector not a AIR app. – BotMaster Jul 27 '15 at 12:33

1 Answers1

0

From your updates, this seems to be a security violation, and you will need to provide AIR the necessary permissions to be able to do this. Try this at the start of your application:

Security.allowDomain("Your Domain URL here");

And, In Flash IDE by going to File->Publish Settings->Flash->Local playback security and choosing either ‘Access local files only’ or ‘Access network only’.

If your application is web-based and is accessing a web-service of some kind on a different domain to the one the .swf file is hosted on you can get a sandbox violation if the domain you are accessing does not have a valid cross domain policy in place. You would also need to place a crossdomain.xml file at the root of your server which you are trying to access. It looks like this:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <allow-access-from domain="*" />
    <site-control permitted-cross-domain-policies="master-only"/>
</cross-domain-policy>

Hope this helps.

Gurtej Singh
  • 3,244
  • 1
  • 14
  • 27