The Flash and PHP Bible has been released! The book can be found on Amazon or wherever fine books are sold in your area.
The Flash and PHP Bible has a forum for quick support.
A quick look at saving text to the Users clipboard, with their permission.
A common use for a web application is copying contents to the clipboard. Well if you are building a Flash web app you can easily include this functionality with one line of code.
System.setClipboard("Sample text, from Flash");
While that is pretty simple, lets look at a worthwhile use for this. Imagine you have a web app that has hard to remember or even say URLs, wouldn't it be nice if you could easily allow users to share those complex links? Well with a little javascript magic and writing to the clipboard you can.
Here is the code for this proof-of-concept.
import flash.external.*;
import flash.system.System;
function grabLink():void
{
System.setClipboard("Current URL: " + ExternalInterface.call("window.location.href.toString"));
}
grabLink();
There you have it, a few useful examples of utilizing the clipboard in ActionScript 3. Happy coding.
©2004 - 2010 scriptplayground | Privacy Policy | Legal
Validate Site: XHTML CSS | Designed by: Matthew Keefe of mkeefeDESIGN