Maybe its just my contrarian nature resisting stack overflow, but I think I’m going to kick it old school for the time being and stick to posting my stupid programming questions and pathetic hacks on my own personal blog. After all I’ve got like 3 readers and I don’t work in some swank NYC development shop so I’m pretty sure these people aren’t reading because of some cult of personality (read: do you really need my readership too Spolsky–come on).
Seriously, do I actually need to go to a single site to get programming questions answered? I thought that’s what Google was for? I just wonder how long before the trolls and zealots burn the site down. Last time I checked nerds generally refused to interact with each other unless leading WoW raids, making crusty remarks on some semi-exclusive IRC channel, or stampeding on Slashdot. :-)
As such, in the spirit of PK (Phillip Kerman) I ask Why? Why is there a damn ClipboardFormats.URL_FORMAT constant? For the life of me I can’t figure out what this actually represents. I haven’t been able to stick anything on the clipboard that gets an affirmative back when Clipboard.hasFormat( ClipboardFormats.URL_FORMAT ) is the test. Has anyone ever seen this used in the wild? Any idea why the documentation even bothers listing it? Is it just a placeholder? A native AS3 object (URLRequest)?

Holy cow this sort of thing bothers me. It’s enough to keep me up late at night blogging and watching bad movies or making fun of some hopelessly nerdy site like stackoverlow. I mean how pathetic and lame is that?
…if you’ve got answers leave ‘em in the comments.
[...] Link to the original site [...]
It is a constant that indicates that the item being dragged can be represented as a URL. For example, on Mac, if you drag an item with ClipboardFormats.URL_FORMAT to a Safari icon, it will highlight the icon (since safari supports URLS), but if you drop it on Mail, the icon wont highlight.
mike chambers
mesh@adobe.com
Ok, so that explains how other applications receive a drag from AIR, but that has nothing to do with AIR or Actionscript having to check it.
Can you provide an example of how that would be used in a way that TEXT_FORMAT couldn’t?
I also don’t understand why the documentation is 3 words.
Text data is not necessarily a URL.
If you try to drag text to a firefox or safari icon, it is ignored. If you drag a URL, it highlights.
The different types are so that apps can indicate whether they support the type.
As far as the docs, the entry is describing what the constant represents. It represents a URL. Just as the TEXT_FORMAT entry indicates it represents a string.
If you want to know how those APIs can be used, there is more in depth documentation in other parts of the docs.
mike chambers
mesh@adobe.com
@Mike – Hey I get that its a constant. I understand its a String. While it helps to know the data type and volatility of the referenced data its not all that useful by itself. I’ve also done drag and drop and tested for format types. I understand the concept. I just haven’t been able to paste anything on the clipboard (URL or otherwise) that returns true when Clipboard.hasFormat( ClipboardFormats.URL_FORMAT ) is run against the clipboard.
If I’m hearing you correctly, it’s only relevant when dragging from AIR to the OS or from AIR to AIR. If so why isn’t this mentioned in the docs? If more detail is given someplace else (I’ve been looking) I’d appreciate a link.
In general I think the Adobe documentation is great. I use it all of the time. However, lots of times I find information to be incredibly terse to the point of being cryptic and that’s frustrating.
Your explanation about dragging from AIR to a browser helps although I’d like to know how AIR determines what qualifies as a URL. You’re dragging a reference to String data. Does AIR look for an acceptable protocol prefix? Does it only work when copying data from properties that hold URL Strings? What are the rules and how does it work?
Hello!
Very Interesting post! Thank you for such interesting resource!
PS: Sorry for my bad english, I’v just started to learn this language ;)
See you!
Your, Raiul Baztepo