EPIC FACEPALM
package {
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.utils.ByteArray;
[SWF(width=465,height=465,backgroundColor=0)]
public class FacePalm extends Sprite {
public function FacePalm () {
var loader:URLLoader = new URLLoader;
loader.dataFormat = "binary";
loader.addEventListener (Event.COMPLETE, onLoaded);
loader.load (new URLRequest ("http://assets.wonderfl.net/images/related_images/c/cf/cfbc/cfbcc8325dfaeb33e608d560263890eaca63ab28"));
}
private function onLoaded (e:Event):void {
var loader:URLLoader = URLLoader (e.target);
var bytes:ByteArray = new ByteArray;
bytes.writeBytes (loader.data, 49);
var video:Loader = new Loader;
video.x = (465 - 420) / 2;
video.y = (465 - 206) / 2;
video.loadBytes (bytes);
addChild (video);
}
}
}