The System.setClipboard(“Lorem ipsum”) replaces the contents of the Clipboard with a specified text string. This method works from any security context when called as a result of user event (such as a keyboard or mouse event handler).
Start with an empty fla, drag a Button component in the library and the use the following code:
how can use System.setClipboard(“Lorem ipsum”); this in fla..please explain
The System.setClipboard(“Lorem ipsum”) replaces the contents of the Clipboard with a specified text string. This method works from any security context when called as a result of user event (such as a keyboard or mouse event handler).
Start with an empty fla, drag a Button component in the library and the use the following code:
2
3
4
5
6
7
8
9
10
11
12
13
import flash.events.MouseEvent;
var b : Button = new Button();
b.label = "Copy URL";
b.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(b);
function clickHandler(event : MouseEvent):void
{
System.setClipboard("http://www.rblab.com");
b.label = "URL copied";
}