forked from: Security.loadPolicyFile() Ignored

by mash forked from Security.loadPolicyFile() Ignored (diff: 11)
not working too on my Mac10,1,82,76 debug player,
but works fine on same version non-debug.

my crossdomain.xml file is like this, and I'm sending Content-Type: text/x-cross-domain-policy 


http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

  
  

♥1 | Line 24 | Modified 2010-09-16 21:38:49 | MIT License
play

ActionScript3 source code

/**
 * Copyright mash ( http://wonderfl.net/user/mash )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ykWW
 */

// forked from jozefchutka's Security.loadPolicyFile() Ignored
package
{
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.events.*;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.system.Security;
    
    public class WonderflApp extends Sprite
    {
        private var path:String = "http://maaash.jp/lab/crossdomain-test/";
        
        public function WonderflApp():void
        {
            Security.loadPolicyFile(path + "crossdomain.xml");
            
            var tf :TextField = new TextField;
            addChild(tf);
            
            var loader:URLLoader = new URLLoader();
            loader.load(new URLRequest(path + "text.txt"));
            loader.addEventListener( Event.COMPLETE, function(ev:Event) :void {
                tf.text = loader.data as String;
            });

        }
    }
}

Forked