Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Update: It turns out that OP already has the image in a <code>UILoader</code>. In that case, you can access it using the <code>content</code> property of <code>UILoader</code></p> <pre><code>var img:Bitmap = Bitmap(uiLoader.content); var bitmapdata:BitmapData = img.bitmapData; </code></pre> <hr> <p>You can load the user picture to your SWF using a <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html" rel="nofollow noreferrer">Loader</a> object and manipulate it, provided the image is hosted in a sever that allows SWFs from your domain to access contents using appropriate <code>crossdomain.xml</code>.</p> <p>If you know the location of policy file, call <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/Security.html#loadPolicyFile()" rel="nofollow noreferrer">Security.loadPoliCyFile</a> before loading image. Flash player will try to load it from the default location <code>/crossdomain.xml</code></p> <pre><code>Security.loadPolicyFile(policy-file-url); var ldr:Loader = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoad); ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError); ldr.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError); ldr.load(new URLRequest(the-image-url); function onError(e:Event):void { trace(e); } function onLoad(e:Event):void { //this will fail if there is no crossdomain.xml file at //the image's originating server. var image:Bitmap = LoaderInfo(e.target).content as Bitmap; var bitmapData:BitmapData = image.bitmapData; //do whatever you want with the bitmap data here addChild(image); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload