forked from: forked from: Security.loadPolicyFile() Ignored

by jules forked from forked from: Security.loadPolicyFile() Ignored (diff: 2)
♥0 | Line 23 | Modified 2015-03-09 04:28:01 | MIT License
play

ActionScript3 source code

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

// forked from mash's forked from: Security.loadPolicyFile() Ignored
// 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
        {
            
            
            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;
            });

        }
    }
}