Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I assume this is a part of an AIR application. (Accessing the clipboard from a plain Flex app is not possible.)</p> <p>I have no experience with AIR, but your second code block is clearly wrong. An <code>URLRequest</code> instance does nothing in itself, it is but a static object storing the request details. In order to fetch the data from that URL, you need to create a <code>Loader</code>, and pass the request to that loader like this:</p> <pre><code>var req:URLRequest = new URLRequest(value.file.url); // this is a local file (e.g. file:///C:/somefile.jpg) var ldr:Loader = new Loader(); ldr.addEventListener(Event.COMPLETE, function(event:Event):void { var b:Bitmap = event.target.content as Bitmap; }); ldr.load(req); </code></pre> <p>Of course, you'd have to fill in the <code>Event.COMPLETE</code> handler. Note that the <code>Loader</code> class can be used to load SWF and image objects, for all everything else, you'd have to use <code>URLLoader</code> and parse the data yourself.</p> <p>Regarding the <code>nativeDragDrop</code> block, here's a snippet from the <a href="http://livedocs.adobe.com/flex/3/langref/" rel="nofollow noreferrer">documentation</a>:</p> <blockquote> <p>Typically a handler for the nativeDragEnter or nativeDragOver event evaluates the data being dragged, along with the drag actions allowed, to determine whether an interactive object can accept a drop. To specify that an interactive object is an eligible target, the event handler must call the NativeDragManager.acceptDrop() function, passing in a reference to the object. If the user releases the mouse button over the designated object, the object becomes the drop target and dispatches the nativeDragDrop event.</p> </blockquote> <p>Are you calling <code>NativeDragManager.acceptDrop()</code> properly?</p>
 

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