In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

Getting image withouth crossdomain trough proxy

Original experiment made me curious of what is possible to do with proxies in flash.
Will return to play with this interesting possibility tomorrow. So far it seems its possible to make a workaround for crossdomain limitations Will try tomorrow. using proxies for images/swf files/text. Now I wonder if it is possible to do the same with sounds/video and streams :D

This thing is also cool because its not really a bug/security hole. But you are dependent on a proxy.
/**
 * Copyright wonderwhyer ( http://wonderfl.net/user/wonderwhyer )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/xh6x
 */

// forked from wh0's Using proxies without crossdomain.xml
package {
    import flash.display.LoaderInfo;
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.system.Security;
    import flash.text.TextField;
    public class FlashTest extends Sprite {
        
        // Wrap url in proxy parameter.
        private function proxy(url:String):String {
            return 'http://www.gmodules.com/ig/proxy?url=' + encodeURIComponent(url);
        }
        
        public function FlashTest() {
            // Only the top level movie starts off with stage populated.
            if (stage) {
                // The top level movie is likely included from wonderfl.net and therefore unproxied.
                // All we do in this case is load the proxied version.
                // Allow the proxy domain so wee can access stage on lines 45-46.
                Security.allowDomain('www.gmodules.com');
                var l:Loader = new Loader();
                l.load(new URLRequest(proxy(loaderInfo.url)));
                addChild(l);
                return;
            } else {
                // Allow Wonderfl to take a screen cap.
                Security.allowDomain('swf.wonderfl.net');
                addEventListener(Event.ADDED_TO_STAGE, init);
            }

        }
        
        private function init(e:Event):void {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            var loader:Loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
            loader.load(new URLRequest(proxy("http://i1-news.softpedia-static.com/images/news2/Adobe-Droping-PPC-in-Next-Creative-Suite-CS-Release-2.png")));
        }
        
        private function complete(e:Event):void {
           addChild((e.currentTarget as LoaderInfo).content);
        }
        
    }
}